Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Sep 19, 2024
1 parent c79cd0e commit b76176e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/engine.io/test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ const { Socket } =
? require("engine.io-client-v3")
: require("engine.io-client");

switch (process.env.EIO_WS_ENGINE) {
case "uws":
console.log(
"[WARN] testing with uWebSockets.js instead of Node.js built-in HTTP server",
);
break;
case "eiows":
console.log("[WARN] testing with eiows instead of ws");
break;
}

/**
* Listen shortcut that fires a callback on an ephemeral port.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/engine.io/test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ describe("server", () => {
.end((err, res) => {
if (process.env.EIO_WS_ENGINE === "uws") {
expect(err).to.not.be(null);
expect(err.message).to.be("socket hang up");
expect(err.status).to.be(404);
} else {
expect(err).to.be(null);
// this should not work, but it is kept for backward-compatibility
Expand Down

0 comments on commit b76176e

Please sign in to comment.