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

Function testTrustedSourceIdentity

test/parallel/test-stream-iter-readable-interop.js:595–603  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

593// =============================================================================
594
595function testTrustedSourceIdentity() {
596 const readable = new Readable({ read() {} });
597 const iter = readable[toAsyncStreamable]();
598
599 // from() should return the validated iterator directly (same reference),
600 // not wrap it in another generator
601 const result = from(iter);
602 assert.strictEqual(result, iter);
603}
604
605// =============================================================================
606// Run all tests

Calls 1

fromFunction · 0.50

Tested by

no test coverage detected