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

Function testCorruptZstdData

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

Source from the content-addressed store, hash-verified

50}
51
52async function testCorruptZstdData() {
53 // Completely invalid data (not even valid magic bytes)
54 const corrupt = new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF, 0xFF]);
55 await assert.rejects(
56 async () => await bytes(pull(from(corrupt), decompressZstd())), {
57 name: 'Error',
58 code: 'ZSTD_error_prefix_unknown',
59 });
60}
61
62// =============================================================================
63// Run all tests

Calls 4

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