Skip to content

Commit

Permalink
test: fix todo (#3653)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Aug 16, 2021
1 parent 6e2cbde commit 2adfd01
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 2 deletions.
Expand Up @@ -24,6 +24,52 @@ Array [

exports[`web socket communication should work and close web socket client connection when web socket server closed ("ws"): page errors 1`] = `Array []`;

exports[`web socket communication should work and reconnect when the connection is lost ("sockjs"): console messages 1`] = `
Array [
"[HMR] Waiting for update signal from WDS...",
"Hey.",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
"[webpack-dev-server] Disconnected!",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
"[webpack-dev-server] App hot update...",
"[HMR] Checking for updates on the server...",
"Failed to load resource: the server responded with a status of 404 (Not Found)",
"[HMR] Cannot find update. Need to do a full reload!",
"[HMR] (Probably because of restarting the webpack-dev-server)",
"[HMR] Waiting for update signal from WDS...",
"Hey.",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
]
`;

exports[`web socket communication should work and reconnect when the connection is lost ("sockjs"): page errors 1`] = `Array []`;

exports[`web socket communication should work and reconnect when the connection is lost ("ws"): console messages 1`] = `
Array [
"[HMR] Waiting for update signal from WDS...",
"Hey.",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
"[webpack-dev-server] Disconnected!",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
"[webpack-dev-server] App hot update...",
"[HMR] Checking for updates on the server...",
"Failed to load resource: the server responded with a status of 404 (Not Found)",
"[HMR] Cannot find update. Need to do a full reload!",
"[HMR] (Probably because of restarting the webpack-dev-server)",
"[HMR] Waiting for update signal from WDS...",
"Hey.",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
]
`;

exports[`web socket communication should work and reconnect when the connection is lost ("ws"): page errors 1`] = `Array []`;

exports[`web socket communication should work and terminate client that is not alive ("sockjs"): console messages 1`] = `
Array [
"[HMR] Waiting for update signal from WDS...",
Expand Down
Expand Up @@ -24,6 +24,52 @@ Array [

exports[`web socket communication should work and close web socket client connection when web socket server closed ("ws"): page errors 1`] = `Array []`;

exports[`web socket communication should work and reconnect when the connection is lost ("sockjs"): console messages 1`] = `
Array [
"[HMR] Waiting for update signal from WDS...",
"Hey.",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
"[webpack-dev-server] Disconnected!",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
"[webpack-dev-server] App hot update...",
"[HMR] Checking for updates on the server...",
"Failed to load resource: the server responded with a status of 404 (Not Found)",
"[HMR] Cannot find update. Need to do a full reload!",
"[HMR] (Probably because of restarting the webpack-dev-server)",
"[HMR] Waiting for update signal from WDS...",
"Hey.",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
]
`;

exports[`web socket communication should work and reconnect when the connection is lost ("sockjs"): page errors 1`] = `Array []`;

exports[`web socket communication should work and reconnect when the connection is lost ("ws"): console messages 1`] = `
Array [
"[HMR] Waiting for update signal from WDS...",
"Hey.",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
"[webpack-dev-server] Disconnected!",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
"[webpack-dev-server] App hot update...",
"[HMR] Checking for updates on the server...",
"Failed to load resource: the server responded with a status of 404 (Not Found)",
"[HMR] Cannot find update. Need to do a full reload!",
"[HMR] (Probably because of restarting the webpack-dev-server)",
"[HMR] Waiting for update signal from WDS...",
"Hey.",
"[webpack-dev-server] Hot Module Replacement enabled.",
"[webpack-dev-server] Live Reloading enabled.",
]
`;

exports[`web socket communication should work and reconnect when the connection is lost ("ws"): page errors 1`] = `Array []`;

exports[`web socket communication should work and terminate client that is not alive ("sockjs"): console messages 1`] = `
Array [
"[HMR] Waiting for update signal from WDS...",
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/web-socket-communication.test.js
Expand Up @@ -109,8 +109,7 @@ describe("web socket communication", () => {
await server.stop();
});

// TODO uncomment after fix regression in webpack
it.skip(`should work and reconnect when the connection is lost ("${websocketServer}")`, async () => {
it(`should work and reconnect when the connection is lost ("${websocketServer}")`, async () => {
WebsocketServer.heartbeatInterval = 100;

const compiler = webpack(config);
Expand Down

0 comments on commit 2adfd01

Please sign in to comment.