Skip to content

Commit 6373faf

Browse files
test: update
1 parent 278226a commit 6373faf

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

test/cli/__snapshots__/basic.test.js.snap.webpack4

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ Options:
8787
--no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default)
8888
--open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen
8989
--no-open Does not open the default browser.
90-
--open-target [value...] Opens specified page in browser.
91-
--no-open-target Does not open specified page in browser.
90+
--open-target <value...> Opens specified page in browser.
9291
--open-app-name <value...> Open specified browser.
9392
--open-app <value...> Open specified browser.
9493
--open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen

test/cli/__snapshots__/basic.test.js.snap.webpack5

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3+
exports[`basic basic should work using "--host localhost --port <port>": stderr 1`] = `
4+
"<i> [webpack-dev-server] Project is running at:
5+
<i> [webpack-dev-server] Loopback: http://localhost:<port>/, http://127.0.0.1:<port>/
6+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
7+
`;
8+
39
exports[`basic basic should work: stderr 1`] = `
410
"<i> [webpack-dev-server] Project is running at:
511
<i> [webpack-dev-server] Loopback: http://localhost:<port>/

test/cli/__snapshots__/host-option.test.js.snap.webpack4

+14-7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ exports[`"host" CLI option should work using "--host ::1" (IPv6): stderr 1`] = `
1414
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
1515
`;
1616

17+
exports[`"host" CLI option should work using "--host ::1" (IPv6): stderr 2`] = `
18+
"<i> [webpack-dev-server] Project is running at:
19+
<i> [webpack-dev-server] Loopback: http://[::1]:<port>/
20+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
21+
`;
22+
1723
exports[`"host" CLI option should work using "--host <IPv4>": stderr 1`] = `
1824
"<i> [webpack-dev-server] Project is running at:
1925
<i> [webpack-dev-server] On Your Network (IPv4): http://<network-ip-v4>:<port>/
@@ -28,13 +34,6 @@ exports[`"host" CLI option should work using "--host 0.0.0.0" (IPv4): stderr 1`]
2834
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
2935
`;
3036

31-
exports[`"host" CLI option should work using "--host 0:0:0:0:0:FFFF:7F00:0001" (IPv6): stderr 1`] = `
32-
"<i> [webpack-dev-server] Project is running at:
33-
<i> [webpack-dev-server] On Your Network (IPv4): http://127.0.0.1:<port>/
34-
<i> [webpack-dev-server] On Your Network (IPv6): http://[::ffff:127.0.0.1]:<port>/
35-
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
36-
`;
37-
3837
exports[`"host" CLI option should work using "--host 127.0.0.1" (IPv4): stderr 1`] = `
3938
"<i> [webpack-dev-server] Project is running at:
4039
<i> [webpack-dev-server] Loopback: http://127.0.0.1:<port>/
@@ -53,6 +52,14 @@ exports[`"host" CLI option should work using "--host local-ipv4": stderr 1`] = `
5352
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
5453
`;
5554

55+
exports[`"host" CLI option should work using "--host local-ipv6": stderr 1`] = `
56+
"<i> [webpack-dev-server] Project is running at:
57+
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
58+
<i> [webpack-dev-server] On Your Network (IPv4): http://<network-ip-v4>:<port>/
59+
<i> [webpack-dev-server] On Your Network (IPv6): http://[<network-ip-v6>]:<port>/
60+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
61+
`;
62+
5663
exports[`"host" CLI option should work using "--host localhost": stderr 1`] = `
5764
"<i> [webpack-dev-server] Project is running at:
5865
<i> [webpack-dev-server] Loopback: http://localhost:<port>/, http://127.0.0.1:<port>/

test/cli/basic.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('basic', () => {
4242
});
4343

4444
describe('basic', () => {
45-
it.only('should work', async () => {
45+
it('should work', async () => {
4646
const { exitCode, stderr } = await testBin([
4747
// Ideally it should be empty to test without arguments, unfortunately it takes 8080 port and other test can failed
4848
'--port',

0 commit comments

Comments
 (0)