MCPcopy Create free account
hub / github.com/nodejs/node / assertDoesntParse

Function assertDoesntParse

deps/v8/test/mjsunit/harmony/class-static-blocks.js:127–131  ·  view source on GitHub ↗
(expr, context_start, context_end)

Source from the content-addressed store, hash-verified

125}
126
127function assertDoesntParse(expr, context_start, context_end) {
128 assertThrows(() => {
129 eval(`${context_start} class C { static { ${expr} } } ${context_end}`);
130 }, SyntaxError);
131}
132
133for (let [s, e] of [['', ''],
134 ['function* g() {', '}'],

Callers 1

Calls 2

assertThrowsFunction · 0.50
evalFunction · 0.50

Tested by

no test coverage detected