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

Function testEval

deps/v8/test/mjsunit/global-load-from-nested-eval.js:47–53  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

45
46// Shadow variable with an eval-introduced variable.
47function testEval(source) {
48 eval('var x = 1');
49 function f() {
50 eval('eval('+ source + ')');
51 }
52 f();
53}
54testEval('assertEquals(1, x)');
55
56// Eval that does not shadow.

Callers 1

Calls 2

evalFunction · 0.70
fFunction · 0.70

Tested by

no test coverage detected