Skip to content

Commit 0f1211f

Browse files
isaacsruyadorno
authored andcommittedJan 7, 2021
test: provide more garbagey gzip data for zlib fail test
1 parent 3c1afee commit 0f1211f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎test/unpack.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2508,8 +2508,8 @@ t.test('do not reuse hardlinks, only nlink=1 files', t => {
25082508
t.end()
25092509
})
25102510

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

0 commit comments

Comments
 (0)
Please sign in to comment.