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

Function testArrayBufferAsync

test/parallel/test-stream-iter-consumers-bytes.js:72–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72async function testArrayBufferAsync() {
73 const ab = await arrayBuffer(from(new Uint8Array([10, 20, 30])));
74 assert.ok(ab instanceof ArrayBuffer);
75 assert.strictEqual(ab.byteLength, 3);
76 const view = new Uint8Array(ab);
77 assert.deepStrictEqual(view, new Uint8Array([10, 20, 30]));
78}
79
80// =============================================================================
81// arraySync / array

Calls 3

arrayBufferFunction · 0.50
fromFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…