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

Function testRejectInvalid

test/parallel/test-vm-cached-data.js:61–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59testProduceMultiple();
60
61function testRejectInvalid() {
62 const source = getSource('invalid');
63
64 const data = produce(source);
65
66 // It should reject invalid code cache
67 const script = new vm.Script(getSource('invalid_1'), {
68 cachedData: data
69 });
70 assert(script.cachedDataRejected);
71 assert.strictEqual(script.runInThisContext()(), 'invalid_1');
72}
73testRejectInvalid();
74
75function testRejectSlice() {

Callers 1

Calls 4

runInThisContextMethod · 0.95
produceFunction · 0.85
getSourceFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…