Skip to content

Commit cf55101

Browse files
committed
test: more
1 parent 305a392 commit cf55101

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ exports[`CLI --https 1`] = `
116116
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
117117
`;
118118

119+
exports[`CLI --https-request-cert 1`] = `
120+
"<i> [webpack-dev-server] Project is running at:
121+
<i> [webpack-dev-server] Loopback: https://localhost:<port>/
122+
<i> [webpack-dev-server] On Your Network (IPv4): https://<network-ip-v4>:<port>/
123+
<i> [webpack-dev-server] On Your Network (IPv6): https://[<network-ip-v6>]:<port>/
124+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
125+
`;
126+
119127
exports[`CLI --no-bonjour 1`] = `
120128
"<i> [webpack-dev-server] Project is running at:
121129
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
@@ -148,6 +156,14 @@ exports[`CLI --no-https 1`] = `
148156
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
149157
`;
150158

159+
exports[`CLI --no-https-request-cert 1`] = `
160+
"<i> [webpack-dev-server] Project is running at:
161+
<i> [webpack-dev-server] Loopback: https://localhost:<port>/
162+
<i> [webpack-dev-server] On Your Network (IPv4): https://<network-ip-v4>:<port>/
163+
<i> [webpack-dev-server] On Your Network (IPv6): https://[<network-ip-v6>]:<port>/
164+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
165+
`;
166+
151167
exports[`CLI should generate correct cli flags 1`] = `
152168
"Usage: webpack serve|s [entries...] [options]
153169

test/cli/cli.test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,32 @@ describe('CLI', () => {
139139
.catch(done);
140140
});
141141

142+
it('--https-request-cert', (done) => {
143+
testBin('--https-request-cert')
144+
.then((output) => {
145+
expect(output.exitCode).toEqual(0);
146+
expect(
147+
normalizeStderr(output.stderr, { ipv6: true, https: true })
148+
).toMatchSnapshot();
149+
150+
done();
151+
})
152+
.catch(done);
153+
});
154+
155+
it('--no-https-request-cert', (done) => {
156+
testBin('--no-https-request-cert')
157+
.then((output) => {
158+
expect(output.exitCode).toEqual(0);
159+
expect(
160+
normalizeStderr(output.stderr, { ipv6: true })
161+
).toMatchSnapshot();
162+
163+
done();
164+
})
165+
.catch(done);
166+
});
167+
142168
it('--no-https', (done) => {
143169
testBin('--no-https')
144170
.then((output) => {

0 commit comments

Comments
 (0)