From 1bffa3142fe6216e6682e2550d55cd4cfb3ea003 Mon Sep 17 00:00:00 2001 From: Pelle Wessman Date: Mon, 15 Jan 2024 15:58:14 +0100 Subject: [PATCH] Fix test failing on new node versions (#306) --- test/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index 4ff9852..33fbb37 100755 --- a/test/index.js +++ b/test/index.js @@ -2111,7 +2111,8 @@ describe('gunzip', () => { const options = { json: true }; const err = await expect(Wreck.get(`http://localhost:${server.address().port}`, options)).to.reject(); - expect(err).to.be.an.error('Unexpected token \u001f in JSON at position 0'); + expect(err).to.be.an.error(/Unexpected token/); + expect(Boom.isBoom(err)).to.be.true(); expect(err.data.res.statusCode).to.equal(200); expect(err.data.payload).to.equal(Zlib.gzipSync(JSON.stringify({ foo: 'bar' }))); flags.onCleanup = () => server.close();