Skip to content

Commit ae7f3bf

Browse files
test: fix
1 parent 83295b7 commit ae7f3bf

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`"bonjour" CLI option should work using "--bonjour and --https" 1`] = `
4-
"<i> [webpack-dev-server] Project is running at:
4+
"<i> [webpack-dev-server] Generating SSL Certificate...
5+
<i> [webpack-dev-server] SSL certificate: <cwd>/node_modules/.cache/webpack-dev-server/server.pem
6+
<i> [webpack-dev-server] Project is running at:
57
<i> [webpack-dev-server] Loopback: https://localhost:<port>/
68
<i> [webpack-dev-server] On Your Network (IPv4): https://<ip-v4>:<port>/
79
<i> [webpack-dev-server] On Your Network (IPv6): https://[<ip-v6>]:<port>/

test/cli/__snapshots__/bonjour-option.test.js.snap.webpack5

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`"bonjour" CLI option should work using "--bonjour and --https" 1`] = `
4-
"<i> [webpack-dev-server] Project is running at:
4+
"<i> [webpack-dev-server] Generating SSL Certificate...
5+
<i> [webpack-dev-server] SSL certificate: <cwd>/node_modules/.cache/webpack-dev-server/server.pem
6+
<i> [webpack-dev-server] Project is running at:
57
<i> [webpack-dev-server] Loopback: https://localhost:<port>/
68
<i> [webpack-dev-server] On Your Network (IPv4): https://<ip-v4>:<port>/
79
<i> [webpack-dev-server] On Your Network (IPv6): https://[<ip-v6>]:<port>/

test/cli/bonjour-option.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
"use strict";
22

3+
const del = require("del");
4+
const Server = require("../../lib/Server");
35
const { testBin, normalizeStderr } = require("../helpers/test-bin");
46
const port = require("../ports-map")["cli-bonjour"];
57

8+
const defaultCertificateDir = Server.findCacheDir();
9+
610
describe('"bonjour" CLI option', () => {
11+
beforeEach(async () => {
12+
await del([defaultCertificateDir]);
13+
});
14+
715
it('should work using "--bonjour"', async () => {
816
const { exitCode, stderr } = await testBin(["--port", port, "--bonjour"]);
917

0 commit comments

Comments
 (0)