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

Function testWritevAsync

test/parallel/test-stream-iter-broadcast-backpressure.js:109–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108// Writev async path
109async function testWritevAsync() {
110 const { writer, broadcast: bc } = broadcast({ highWaterMark: 10 });
111 const consumer = bc.push();
112
113 await writer.writev(['hello', ' ', 'world']);
114 await writer.end();
115
116 const data = await text(consumer);
117 assert.strictEqual(data, 'hello world');
118}
119
120// endSync returns the total byte count
121async function testEndSyncReturnValue() {

Calls 5

broadcastFunction · 0.50
textFunction · 0.50
pushMethod · 0.45
writevMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected