diff --git a/tests/library/browsercontext-fetch.spec.ts b/tests/library/browsercontext-fetch.spec.ts index 223a57b5d0..0efb4bacb6 100644 --- a/tests/library/browsercontext-fetch.spec.ts +++ b/tests/library/browsercontext-fetch.spec.ts @@ -829,7 +829,7 @@ it('should not hang on a brotli encoded Range request', async ({ context, server headers: { range: 'bytes=0-2', }, - })).rejects.toThrow(`failed to decompress 'br' encoding: Error: unexpected end of file`); + })).rejects.toThrow(/(failed to decompress 'br' encoding: Error: unexpected end of file|Parse Error: Data after \`Connection: close\`)/); }); it('should dispose', async function({ context, server }) {