From 43422ffc666ba07ee841f214663f04e1d5b3d9bb Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 6 Jan 2021 15:40:57 -0800 Subject: [PATCH] Skip known-bad test on old Node.js versions --- test/unpack.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unpack.js b/test/unpack.js index b754170a..65a5937c 100644 --- a/test/unpack.js +++ b/test/unpack.js @@ -2571,10 +2571,10 @@ t.test('trying to unpack a javascript file should fail', t => { new Unpack(opts) .once('error', er => t.match(er, expect, 'async emits')) .end(dataGzip) - t.throws(() => { - const f = new UnpackSync(opts) - f.end(dataGzip) - }, expect, 'sync throws') + const skip = !/^v([0-9]|1[0-3])\./.test(process.version) ? false + : 'node prior to v14 did not raise sync zlib errors properly' + t.throws(() => new UnpackSync(opts).end(dataGzip), + expect, 'sync throws', {skip}) }) t.test('bad archive if no gzip', t => {