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

Function testConsumerBreak

test/parallel/test-stream-iter-push-basic.js:77–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75}
76
77async function testConsumerBreak() {
78 const { writer, readable } = push({ highWaterMark: 10 });
79
80 writer.writeSync('a');
81 writer.writeSync('b');
82 writer.writeSync('c');
83
84 // Break after first batch
85 // eslint-disable-next-line no-unused-vars
86 for await (const _ of readable) {
87 break;
88 }
89
90 // Writer should now see null desiredSize
91 assert.strictEqual(writer.desiredSize, null);
92}
93
94async function testAbortSignal() {
95 const ac = new AbortController();

Callers 1

Calls 2

pushFunction · 0.70
writeSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…