MCPcopy Create free account
hub / github.com/nodejs/node / testBasicAsync

Function testBasicAsync

test/parallel/test-stream-iter-to-readable.js:32–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30// =============================================================================
31
32async function testBasicAsync() {
33 const source = from('hello world');
34 const readable = toReadable(source);
35
36 assert.strictEqual(readable.readableObjectMode, false);
37
38 const result = await collect(readable);
39 assert.strictEqual(result.toString(), 'hello world');
40}
41
42// =============================================================================
43// fromStreamIter: multiple batches, all chunks arrive in order

Callers 1

Calls 4

toReadableFunction · 0.85
collectFunction · 0.70
fromFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected