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

Function runAssertionsOnSandbox

test/parallel/test-vm-global-get-own.js:31–35  ·  view source on GitHub ↗
(builder)

Source from the content-addressed store, hash-verified

29const fun3 = () => 3;
30
31function runAssertionsOnSandbox(builder) {
32 const sandboxContext = vm.createContext({ runAssertions, fun1, fun2, fun3 });
33 vm.runInContext(builder('this'), sandboxContext);
34 vm.runInContext(builder('{}'), sandboxContext);
35}
36
37// Assertions on: define property
38runAssertions(contextGlobal, 'toto', true, 1, 2, 3);

Callers 1

Calls 3

runInContextMethod · 0.80
builderFunction · 0.50
createContextMethod · 0.45

Tested by

no test coverage detected