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

Function testTrustedSourceByteMode

test/parallel/test-stream-iter-readable-interop.js:121–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119// =============================================================================
120
121function testTrustedSourceByteMode() {
122 const readable = new Readable({ read() {} });
123 const result = readable[toAsyncStreamable]();
124 // kValidatedSource is a private symbol, but we can verify the result
125 // is used directly by from() without wrapping by checking it has
126 // Symbol.asyncIterator
127 assert.strictEqual(typeof result[Symbol.asyncIterator], 'function');
128 assert.strictEqual(result.stream, readable);
129}
130
131// =============================================================================
132// Byte-mode Readable: multi-read with delayed pushes

Calls

no outgoing calls

Tested by

no test coverage detected