diff --git a/test/web-socket.spec.ts b/test/web-socket.spec.ts index 370abe375a..812d3f3733 100644 --- a/test/web-socket.spec.ts +++ b/test/web-socket.spec.ts @@ -62,10 +62,10 @@ describe('web socket', (test, { browserName }) => { ws.addEventListener('message', () => { ws.close(); }); }, server.PORT); await socketClosePromise; - if (isFirefox) - expect(log.join(':')).toBe('open:received:sent:close'); - else - expect(log.join(':')).toBe('open:sent:received:close'); + expect(log[0]).toBe('open'); + expect(log[3]).toBe('close'); + log.sort(); + expect(log.join(':')).toBe('close:open:received:sent'); }); it('should emit binary frame events', async ({ page, server }) => {