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

Function testBytesSyncSAB

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

Source from the content-addressed store, hash-verified

49// =============================================================================
50
51function testBytesSyncSAB() {
52 const sab = new SharedArrayBuffer(5);
53 new Uint8Array(sab).set([104, 101, 108, 108, 111]); // 'hello'
54 const data = bytesSync(fromSync(sab));
55 assert.deepStrictEqual(data, new Uint8Array([104, 101, 108, 108, 111]));
56}
57
58async function testBytesAsyncSAB() {
59 const sab = new SharedArrayBuffer(5);

Calls 3

bytesSyncFunction · 0.85
fromSyncFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…