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

Function testWriterFail

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

Source from the content-addressed store, hash-verified

59}
60
61async function testWriterFail() {
62 const { writer, readable } = push();
63
64 writer.fail(new Error('test fail'));
65
66 await assert.rejects(
67 async () => {
68 // eslint-disable-next-line no-unused-vars
69 for await (const _ of readable) {
70 assert.fail('Should not reach here');
71 }
72 },
73 { message: 'test fail' },
74 );
75}
76
77async function testConsumerBreak() {
78 const { writer, readable } = push({ highWaterMark: 10 });

Callers 1

Calls 2

pushFunction · 0.70
failMethod · 0.45

Tested by

no test coverage detected