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

Function goodSource

test/parallel/test-stream-iter-consumers-merge.js:88–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87async function testMergeSourceError() {
88 async function* goodSource() {
89 const enc = new TextEncoder();
90 yield [enc.encode('a')];
91 // Slow so the bad source errors first
92 await new Promise((r) => setTimeout(r, 50));
93 yield [enc.encode('b')];
94 }
95
96 async function* badSource() {
97 yield [new TextEncoder().encode('x')];

Callers 1

testMergeSourceErrorFunction · 0.85

Calls 2

encodeMethod · 0.95
setTimeoutFunction · 0.50

Tested by

no test coverage detected