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

Function testTextAsyncSAB

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

Source from the content-addressed store, hash-verified

70}
71
72async function testTextAsyncSAB() {
73 const sab = new SharedArrayBuffer(5);
74 new Uint8Array(sab).set([104, 101, 108, 108, 111]); // 'hello'
75 const result = await text(from(sab));
76 assert.strictEqual(result, 'hello');
77}
78
79function testArrayBufferSyncSAB() {
80 const sab = new SharedArrayBuffer(4);

Calls 3

textFunction · 0.50
fromFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…