From 1f32200e9e2299bb1b813c2e2656ba2465644b68 Mon Sep 17 00:00:00 2001 From: Dylan Pulver Date: Tue, 3 Nov 2026 18:25:09 -0500 Subject: [PATCH] test(eio-parser): assert the decoded payload in the binary stream tests Three assertions in the packet decoder stream tests had no matcher, so the comparison was evaluated and discarded: expect(areArraysEqual(value.data, payload)); Those tests checked the packet type and that the data was an ArrayBuffer, but never that the decoded bytes matched what was written, which is what the test names describe. The five other `areArraysEqual` assertions in these files, one of them added in #5583, already use `.to.be(true)`. --- packages/engine.io-parser/test/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/engine.io-parser/test/index.ts b/packages/engine.io-parser/test/index.ts index 8ade7cea3..4dea7a8c7 100644 --- a/packages/engine.io-parser/test/index.ts +++ b/packages/engine.io-parser/test/index.ts @@ -278,7 +278,7 @@ describe("engine.io-parser", () => { expect(value.type).to.eql("message"); expect(value.data).to.be.an(ArrayBuffer); - expect(areArraysEqual(value.data, Uint8Array.of(1, 2, 3))); + expect(areArraysEqual(value.data, Uint8Array.of(1, 2, 3))).to.be(true); }); it("should decode a binary packet (ArrayBuffer) (medium)", async () => { @@ -296,7 +296,7 @@ describe("engine.io-parser", () => { expect(value.type).to.eql("message"); expect(value.data).to.be.an(ArrayBuffer); - expect(areArraysEqual(value.data, payload)); + expect(areArraysEqual(value.data, payload)).to.be(true); }); it("should decode a binary packet (ArrayBuffer) (big)", async () => { @@ -314,7 +314,7 @@ describe("engine.io-parser", () => { expect(value.type).to.eql("message"); expect(value.data).to.be.an(ArrayBuffer); - expect(areArraysEqual(value.data, payload)); + expect(areArraysEqual(value.data, payload)).to.be(true); }); it("should return an error packet if the length of the payload is too big", async () => {