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

Function TestTransferFails

deps/v8/test/mjsunit/array-buffer-transfer-detach-key.js:14–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12}
13
14function TestTransferFails() {
15 const ab = new ArrayBuffer(100);
16 %ArrayBufferSetDetachKey(ab, Symbol());
17 assertThrows(() => { ab.transfer(); }, TypeError);
18 assertEquals(100, ab.byteLength); // Not detached.
19}
20
21TestTransferSucceeds();
22TestTransferFails();

Calls 3

SymbolFunction · 0.70
assertThrowsFunction · 0.50
assertEqualsFunction · 0.50

Tested by

no test coverage detected