Skip to content

Commit

Permalink
test: provide more garbagey gzip data for zlib fail test
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs authored and ruyadorno committed Jan 7, 2021
1 parent 3c1afee commit 0f1211f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -2508,8 +2508,8 @@ t.test('do not reuse hardlinks, only nlink=1 files', t => {
t.end()
})

t.test('trying to unpack a javascript file should fail', t => {
const data = fs.readFileSync(__filename)
t.test('trying to unpack a non-zlib gzip file should fail', t => {
const data = Buffer.from('hello this is not gzip data')
const dataGzip = Buffer.concat([Buffer.from([0x1f, 0x8b]), data])
const basedir = path.resolve(unpackdir, 'bad-archive')
t.test('abort if gzip has an error', t => {
Expand Down

0 comments on commit 0f1211f

Please sign in to comment.