Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(server): increase port mapping base number #2148

Merged
merged 1 commit into from
Jul 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/ports-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const portsList = {
Iframe: 1,
};

let startPort = 8079;
let startPort = 8089;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this? I thought it was only necessary to change the number of cli from 2 to 10.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hiroppy There are other tests that use the default ports near 8080, such as: https://github.com/webpack/webpack-dev-server/blob/master/test/server/utils/findPort.test.js. So I think we should provide some extra room to make sure those ports are available.

const ports = {};

Object.keys(portsList).forEach((key) => {
Expand Down
4 changes: 2 additions & 2 deletions test/server/__snapshots__/Server.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Array [
Array [
"client",
"index.js?http:",
"localhost:8090",
"localhost:8100",
],
Array [
"node_modules",
Expand Down Expand Up @@ -35,7 +35,7 @@ Array [
Array [
"client",
"index.js?http:",
"localhost:8090",
"localhost:8100",
],
Array [
"node_modules",
Expand Down
2 changes: 1 addition & 1 deletion test/server/open-option.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('open option', () => {
server.close(() => {
expect(open.mock.calls[0]).toMatchInlineSnapshot(`
Array [
"http://localhost:8110/",
"http://localhost:8120/",
Object {
"wait": false,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`SockJSServer server should recieve connection, send message, and close client 1`] = `"localhost:8083"`;
exports[`SockJSServer server should recieve connection, send message, and close client 1`] = `"localhost:8093"`;

exports[`SockJSServer server should recieve connection, send message, and close client 2`] = `
Array [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`WebsocketServer server should recieve connection, send message, and close client 1`] = `"localhost:8121"`;
exports[`WebsocketServer server should recieve connection, send message, and close client 1`] = `"localhost:8131"`;

exports[`WebsocketServer server should recieve connection, send message, and close client 2`] = `
Array [
Expand Down