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

Function testCorruptGzipData

test/parallel/test-stream-iter-transform-errors.js:22–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20// =============================================================================
21
22async function testCorruptGzipData() {
23 const corrupt = new Uint8Array([0x1F, 0x8B, 0xFF, 0xFF, 0xFF]);
24
25 await assert.rejects(
26 async () => await bytes(pull(from(corrupt), decompressGzip())), {
27 name: 'Error',
28 code: 'Z_DATA_ERROR',
29 });
30}
31
32async function testCorruptDeflateData() {
33 const corrupt = new Uint8Array([0x78, 0xFF, 0xFF, 0xFF]);

Calls 4

decompressGzipFunction · 0.85
pullFunction · 0.70
bytesFunction · 0.50
fromFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…