MCPcopy Create free account
hub / github.com/nodejs/node / testRoundTrip

Function testRoundTrip

test/parallel/test-stream-iter-to-readable.js:570–580  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

568// =============================================================================
569
570async function testRoundTrip() {
571 const original = 'round trip data test';
572
573 // stream/iter -> classic Readable
574 const source = from(original);
575 const readable = toReadable(source);
576
577 // classic Readable -> stream/iter (via toAsyncStreamable)
578 const result = await text(from(readable));
579 assert.strictEqual(result, original);
580}
581
582// =============================================================================
583// Round-trip with compression

Callers 2

escape.jsFile · 0.50

Calls 3

toReadableFunction · 0.85
fromFunction · 0.50
textFunction · 0.50

Tested by

no test coverage detected