MCPcopy Index your code
hub / github.com/nodejs/node / assertSyntaxError

Function assertSyntaxError

deps/v8/test/mjsunit/extra-commas.js:28–37  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28function assertSyntaxError(x) {
29 var caught = false;
30 try {
31 eval(x);
32 } catch (e) {
33 caught = true;
34 assertTrue(e instanceof SyntaxError, "is syntax error");
35 }
36 assertTrue(caught, "throws exception");
37};
38
39
40assertSyntaxError("f(,)");

Callers 1

extra-commas.jsFile · 0.85

Calls 2

evalFunction · 0.70
assertTrueFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…