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

Function testWritevSync

test/parallel/test-stream-iter-broadcast-basic.js:91–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89}
90
91async function testWritevSync() {
92 const { writer, broadcast: bc } = broadcast({ highWaterMark: 10 });
93 const consumer = bc.push();
94
95 assert.strictEqual(writer.writevSync(['hello', ' ', 'world']), true);
96 writer.endSync();
97
98 const data = await text(consumer);
99 assert.strictEqual(data, 'hello world');
100}
101
102async function testWriterEnd() {
103 const { writer, broadcast: bc } = broadcast();

Calls 5

broadcastFunction · 0.50
textFunction · 0.50
pushMethod · 0.45
writevSyncMethod · 0.45
endSyncMethod · 0.45

Tested by

no test coverage detected