Skip to content

Commit

Permalink
test: improve
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Apr 24, 2024
1 parent 52a4dc8 commit 975a0ec
Show file tree
Hide file tree
Showing 2 changed files with 172 additions and 19 deletions.
189 changes: 171 additions & 18 deletions test/e2e/__snapshots__/app.test.js.snap.webpack5
@@ -1,100 +1,253 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`app option should work using "connect (async)" application and "http" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "connect (async)" application and "http" server should handle GET request to index route (/): 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[`app option should work using "connect (async)" application and "http" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "connect (async)" application and "http" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "connect (async)" application and "http" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;

exports[`app option should work using "connect (async)" application and "https" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "connect (async)" application and "https" server should handle GET request to index route (/): 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[`app option should work using "connect (async)" application and "https" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "connect (async)" application and "https" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "connect (async)" application and "https" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;

exports[`app option should work using "connect (async)" application and "spdy" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "connect (async)" application and "spdy" server should handle GET request to index route (/): 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[`app option should work using "connect (async)" application and "spdy" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "connect (async)" application and "spdy" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "connect (async)" application and "spdy" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;

exports[`app option should work using "connect" application and "http" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "connect" application and "http" server should handle GET request to index route (/): 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[`app option should work using "connect" application and "http" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "connect" application and "http" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "connect" application and "http" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;

exports[`app option should work using "connect" application and "https" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "connect" application and "https" server should handle GET request to index route (/): 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[`app option should work using "connect" application and "https" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "connect" application and "https" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "connect" application and "https" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;

exports[`app option should work using "connect" application and "spdy" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "connect" application and "spdy" server should handle GET request to index route (/): 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[`app option should work using "connect" application and "spdy" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "connect" application and "spdy" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "connect" application and "spdy" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;

exports[`app option should work using "express" application and "http" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "express" application and "http" server should handle GET request to index route (/): 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[`app option should work using "express" application and "http" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "express" application and "http" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "express" application and "http" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;

exports[`app option should work using "express" application and "https" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "express" application and "https" server should handle GET request to index route (/): 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[`app option should work using "express" application and "https" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "express" application and "https" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "express" application and "https" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;

exports[`app option should work using "express" application and "spdy" server should handle GET request to index route (/): console messages 1`] = `[]`;
exports[`app option should work using "express" application and "spdy" server should handle GET request to index route (/): 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[`app option should work using "express" application and "spdy" server should handle GET request to index route (/): page errors 1`] = `[]`;

exports[`app option should work using "express" application and "spdy" server should handle GET request to index route (/): response status 1`] = `200`;

exports[`app option should work using "express" application and "spdy" server should handle GET request to index route (/): response text 1`] = `
"Heyo.
"
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
</head>
<body>
<h1>webpack-dev-server is running...</h1>
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
</body>
</html>
"
`;
2 changes: 1 addition & 1 deletion test/e2e/app.test.js
Expand Up @@ -3,7 +3,7 @@
const path = require("path");
const webpack = require("webpack");
const Server = require("../../lib/Server");
const config = require("../fixtures/static-config/webpack.config");
const config = require("../fixtures/client-config/webpack.config");
const runBrowser = require("../helpers/run-browser");
const port = require("../ports-map").app;

Expand Down

0 comments on commit 975a0ec

Please sign in to comment.