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

Function testRejectSlice

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

Source from the content-addressed store, hash-verified

73testRejectInvalid();
74
75function testRejectSlice() {
76 const source = getSource('slice');
77
78 const data = produce(source).slice(4);
79
80 const script = new vm.Script(source, {
81 cachedData: data
82 });
83 assert(script.cachedDataRejected);
84}
85testRejectSlice();
86
87// It should throw on non-Buffer cachedData

Callers 1

Calls 4

produceFunction · 0.85
getSourceFunction · 0.70
sliceMethod · 0.65
assertFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…