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

Function test

test/parallel/test-eval-strict-referenceerror.js:10–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const assert = require('assert');
9
10function test() {
11
12 const code = [
13 'var foo = {m: 1};',
14 '',
15 'function bar() {',
16 '\'use strict\';',
17 'return foo; // foo isn\'t captured in 0.10',
18 '};',
19 ].join('\n');
20
21 eval(code);
22
23 return bar(); // eslint-disable-line no-undef
24
25}
26
27assert.deepStrictEqual(test(), { m: 1 });

Calls 3

evalFunction · 0.70
barFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…