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

Function testEmptyDuplex

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

Source from the content-addressed store, hash-verified

128}
129
130async function testEmptyDuplex() {
131 const [channelA, channelB] = duplex();
132
133 // Close without writing
134 await channelA.close();
135 await channelB.close();
136
137 const dataAtA = await bytes(channelA.readable);
138 const dataAtB = await bytes(channelB.readable);
139
140 assert.strictEqual(dataAtA.byteLength, 0);
141 assert.strictEqual(dataAtB.byteLength, 0);
142}
143
144// Channel fail propagation
145async function testChannelFail() {

Callers 1

Calls 3

duplexFunction · 0.85
closeMethod · 0.65
bytesFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…