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

Function testCorruptBrotliData

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

Source from the content-addressed store, hash-verified

40}
41
42async function testCorruptBrotliData() {
43 const corrupt = new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF]);
44
45 await assert.rejects(
46 async () => await bytes(pull(from(corrupt), decompressBrotli())), {
47 name: 'Error',
48 code: 'ERR__ERROR_FORMAT_PADDING_2',
49 });
50}
51
52async function testCorruptZstdData() {
53 // Completely invalid data (not even valid magic bytes)

Calls 4

decompressBrotliFunction · 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…