From bb4b4a985eb6b00b23aa4b5212f28d396e89e818 Mon Sep 17 00:00:00 2001 From: Nicolas Morel Date: Wed, 6 Mar 2024 23:24:39 +0100 Subject: [PATCH] chore: fix test --- 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();