Skip to content

Commit

Permalink
[test] Use a reserved port
Browse files Browse the repository at this point in the history
The port 1337 might be open.
  • Loading branch information
lpinca committed Sep 8, 2023
1 parent ae60ce0 commit da17a17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/websocket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2813,7 +2813,7 @@ describe('WebSocket', () => {
});

it('can be called from an error listener while connecting', (done) => {
const ws = new WebSocket('ws://localhost:1337');
const ws = new WebSocket('ws://localhost:47');

ws.on('open', () => done(new Error("Unexpected 'open' event")));
ws.on('error', (err) => {
Expand All @@ -2822,7 +2822,7 @@ describe('WebSocket', () => {
ws.close();
ws.on('close', () => done());
});
}).timeout(4000);
});

it("can be called from a listener of the 'redirect' event", (done) => {
const server = http.createServer();
Expand Down Expand Up @@ -3087,7 +3087,7 @@ describe('WebSocket', () => {
});

it('can be called from an error listener while connecting', (done) => {
const ws = new WebSocket('ws://localhost:1337');
const ws = new WebSocket('ws://localhost:47');

ws.on('open', () => done(new Error("Unexpected 'open' event")));
ws.on('error', (err) => {
Expand All @@ -3096,7 +3096,7 @@ describe('WebSocket', () => {
ws.terminate();
ws.on('close', () => done());
});
}).timeout(4000);
});

it("can be called from a listener of the 'redirect' event", (done) => {
const server = http.createServer();
Expand Down

0 comments on commit da17a17

Please sign in to comment.