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

Function testArrayBufferSyncSAB

test/parallel/test-stream-iter-sharedarraybuffer.js:79–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79function testArrayBufferSyncSAB() {
80 const sab = new SharedArrayBuffer(4);
81 new Uint8Array(sab).set([1, 2, 3, 4]);
82 const result = arrayBufferSync(fromSync(sab));
83 assert.ok(result instanceof SharedArrayBuffer || result instanceof ArrayBuffer);
84 assert.deepStrictEqual(new Uint8Array(result), new Uint8Array([1, 2, 3, 4]));
85}
86
87async function testArrayBufferAsyncSAB() {
88 const sab = new SharedArrayBuffer(4);

Calls 4

arrayBufferSyncFunction · 0.85
fromSyncFunction · 0.50
setMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…