-
-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(dev-sever): add e2e test cases part 3 (#7833)
- Loading branch information
1 parent
fa38b86
commit 8bfd639
Showing
73 changed files
with
11,353 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
packages/rspack-dev-server/tests/e2e/__snapshots__/port.test.js.snap.webpack5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`port should work using "<not-specified>" port : console messages 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`port should work using "<not-specified>" port : page errors 1`] = `[]`; | ||
|
||
exports[`port should work using "0" port : console messages 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`port should work using "0" port : page errors 1`] = `[]`; | ||
|
||
exports[`port should work using "8161" port : console messages 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`port should work using "8161" port : console messages 2`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`port should work using "8161" port : page errors 1`] = `[]`; | ||
|
||
exports[`port should work using "8161" port : page errors 2`] = `[]`; | ||
|
||
exports[`port should work using "auto" port : console messages 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`port should work using "auto" port : page errors 1`] = `[]`; | ||
|
||
exports[`port should work using "undefined" port : console messages 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`port should work using "undefined" port : page errors 1`] = `[]`; |
107 changes: 107 additions & 0 deletions
107
...pack-dev-server/tests/e2e/__snapshots__/server-and-client-transport.test.js.snap.webpack5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`server and client transport should throw an error on invalid path to client transport 1`] = `"client.webSocketTransport must be a string denoting a default implementation (e.g. 'sockjs', 'ws') or a full path to a JS file via require.resolve(...) which exports a class "`; | ||
|
||
exports[`server and client transport should throw an error on invalid path to server transport 1`] = `"webSocketServer (webSocketServer.type) must be a string denoting a default implementation (e.g. 'ws', 'sockjs'), a full path to a JS file which exports a class extending BaseServer (webpack-dev-server/lib/servers/BaseServer.js) via require.resolve(...), or the class itself which extends BaseServer"`; | ||
|
||
exports[`server and client transport should throw an error on wrong path 1`] = `"webSocketServer (webSocketServer.type) must be a string denoting a default implementation (e.g. 'ws', 'sockjs'), a full path to a JS file which exports a class extending BaseServer (webpack-dev-server/lib/servers/BaseServer.js) via require.resolve(...), or the class itself which extends BaseServer"`; | ||
|
||
exports[`server and client transport should use "sockjs" transport and "sockjs" web socket server 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use "sockjs" transport, when web socket server is not specify 1`] = `[]`; | ||
|
||
exports[`server and client transport should use "sockjs" web socket server when specify "sockjs" value 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use "sockjs" web socket server when specify "sockjs" value using object 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use "ws" transport and "ws" web socket server 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use "ws" transport, when web socket server is not specify 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use "ws" web socket server when specify "ws" value 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use "ws" web socket server when specify "ws" value using object 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use custom transport and "sockjs" web socket server 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
"open", | ||
"hot", | ||
"liveReload", | ||
"reconnect", | ||
"overlay", | ||
"hash", | ||
"ok", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use custom web socket server when specify class 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use custom web socket server when specify class using object 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use custom web socket server when specify path to class 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use custom web socket server when specify path to class using object 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; | ||
|
||
exports[`server and client transport should use default web socket server ("ws") 1`] = ` | ||
[ | ||
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.", | ||
"[HMR] Waiting for update signal from WDS...", | ||
] | ||
`; |
Oops, something went wrong.
8bfd639
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Benchmark detail: Open
8bfd639
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Ran ecosystem CI: Open