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

Function testPullSyncStatelessTransform

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

Source from the content-addressed store, hash-verified

12}
13
14function testPullSyncStatelessTransform() {
15 const upper = (chunks) => {
16 if (chunks === null) return null;
17 return chunks.map((c) => {
18 const str = new TextDecoder().decode(c);
19 return new TextEncoder().encode(str.toUpperCase());
20 });
21 };
22 const data = bytesSync(pullSync(fromSync('abc'), upper));
23 assert.deepStrictEqual(data, new TextEncoder().encode('ABC'));
24}
25
26function testPullSyncStatefulTransform() {
27 const source = fromSync('data');

Callers 1

Calls 4

bytesSyncFunction · 0.85
pullSyncFunction · 0.85
encodeMethod · 0.80
fromSyncFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…