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

Function testEmptyStream

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

Source from the content-addressed store, hash-verified

157// =============================================================================
158
159async function testEmptyStream() {
160 const readable = new Readable({
161 read() {
162 this.push(null);
163 },
164 });
165
166 const result = await text(from(readable));
167 assert.strictEqual(result, '');
168}
169
170// =============================================================================
171// Byte-mode Readable: error propagation

Calls 2

textFunction · 0.50
fromFunction · 0.50

Tested by

no test coverage detected