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

Function testDeflateCompatWithZlib

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

Source from the content-addressed store, hash-verified

38}
39
40async function testDeflateCompatWithZlib() {
41 const inflate = promisify(zlib.inflate);
42
43 const input = 'Cross-compat deflate test. '.repeat(100);
44 const compressed = await bytes(pull(from(input), compressDeflate()));
45
46 // Decompress with standard zlib
47 const decompressed = await inflate(compressed);
48 assert.strictEqual(decompressed.toString(), input);
49}
50
51async function testBrotliCompatWithZlib() {
52 const brotliDecompress = promisify(zlib.brotliDecompress);

Calls 6

promisifyFunction · 0.85
compressDeflateFunction · 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…