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

Function testNoShadowing

deps/v8/test/mjsunit/arguments-load-across-eval.js:31–43  ·  view source on GitHub ↗
(x, h)

Source from the content-addressed store, hash-verified

29
30// Test loading across an eval call that does not shadow variables.
31function testNoShadowing(x, h) {
32 function f() {
33 eval('1');
34 assertEquals(1, x);
35 assertEquals(2, h());
36 function g() {
37 assertEquals(1, x);
38 assertEquals(2, h());
39 }
40 g();
41 }
42 f();
43}
44
45testNoShadowing(1, function() { return 2; });
46

Callers 1

Calls 1

fFunction · 0.70

Tested by

no test coverage detected