()
| 49 | } |
| 50 | |
| 51 | function testGzipActuallyCompresses() { |
| 52 | const input = 'Repeated data compresses well. '.repeat(1000); |
| 53 | const inputBuf = Buffer.from(input); |
| 54 | const compressed = bytesSync(pullSync(fromSync(inputBuf), |
| 55 | compressGzipSync())); |
| 56 | assert.ok(compressed.byteLength < inputBuf.byteLength, |
| 57 | `Compressed ${compressed.byteLength} should be < ` + |
| 58 | `original ${inputBuf.byteLength}`); |
| 59 | } |
| 60 | |
| 61 | function testGzipBinaryData() { |
| 62 | const inputBuf = Buffer.alloc(10000); |
no test coverage detected
searching dependent graphs…