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

Function testBasicSync

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

Source from the content-addressed store, hash-verified

393// =============================================================================
394
395async function testBasicSync() {
396 const source = fromSync('sync hello');
397 const readable = toReadableSync(source);
398
399 assert.strictEqual(readable.readableObjectMode, false);
400
401 const result = await collect(readable);
402 assert.strictEqual(result.toString(), 'sync hello');
403}
404
405// =============================================================================
406// fromStreamIterSync: synchronous read() returns data immediately

Callers 1

Calls 4

toReadableSyncFunction · 0.85
collectFunction · 0.70
fromSyncFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected