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

Function testPullSyncChainedTransforms

test/parallel/test-stream-iter-pull-sync.js:47–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47function testPullSyncChainedTransforms() {
48 const addExcl = (chunks) => {
49 if (chunks === null) return null;
50 return [...chunks, new TextEncoder().encode('!')];
51 };
52 const addQ = (chunks) => {
53 if (chunks === null) return null;
54 return [...chunks, new TextEncoder().encode('?')];
55 };
56 const result = pullSync(fromSync('hello'), addExcl, addQ);
57 const data = new TextDecoder().decode(bytesSync(result));
58 assert.strictEqual(data, 'hello!?');
59}
60
61// PullSync source error propagates
62function testPullSyncSourceError() {

Callers 1

Calls 4

pullSyncFunction · 0.85
bytesSyncFunction · 0.85
decodeMethod · 0.65
fromSyncFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…