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

Function testWithOptions

test/parallel/test-stream-iter-duplex.js:76–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76async function testWithOptions() {
77 const [channelA, channelB] = duplex({
78 highWaterMark: 2,
79 backpressure: 'strict',
80 });
81
82 await channelA.writer.write('msg');
83 await channelA.close();
84
85 const data = await text(channelB.readable);
86 assert.strictEqual(data, 'msg');
87}
88
89async function testPerChannelOptions() {
90 const [channelA, channelB] = duplex({

Callers 1

Calls 4

duplexFunction · 0.85
closeMethod · 0.65
textFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…