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

Function testBrotliCompatWithZlib

test/parallel/test-stream-iter-transform-compat.js:51–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51async function testBrotliCompatWithZlib() {
52 const brotliDecompress = promisify(zlib.brotliDecompress);
53
54 const input = 'Cross-compat brotli test. '.repeat(100);
55 const compressed = await bytes(pull(from(input), compressBrotli()));
56
57 const decompressed = await brotliDecompress(compressed);
58 assert.strictEqual(decompressed.toString(), input);
59}
60
61async function testZstdCompatWithZlib() {
62 const zstdDecompress = promisify(zlib.zstdDecompress);

Calls 6

promisifyFunction · 0.85
compressBrotliFunction · 0.85
pullFunction · 0.70
bytesFunction · 0.50
fromFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…