Skip to content

Commit 537eeb2

Browse files
authored
test: add case for open with server option (#4309)
* test: add case for `open` with `server` option * test: add case for `open` with `server` option
1 parent 5481b60 commit 537eeb2

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

test/server/open-option.test.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,42 @@ describe('"open" option', () => {
6363
});
6464
});
6565

66+
it("should work with the server: 'https' option", async () => {
67+
const server = new Server(
68+
{
69+
open: true,
70+
port,
71+
server: "https",
72+
},
73+
compiler
74+
);
75+
76+
await server.start();
77+
await server.stop();
78+
79+
expect(open).toHaveBeenCalledWith(`https://localhost:${port}/`, {
80+
wait: false,
81+
});
82+
});
83+
84+
it("should work with the server: 'spdy' option", async () => {
85+
const server = new Server(
86+
{
87+
open: true,
88+
port,
89+
server: "spdy",
90+
},
91+
compiler
92+
);
93+
94+
await server.start();
95+
await server.stop();
96+
97+
expect(open).toHaveBeenCalledWith(`https://localhost:${port}/`, {
98+
wait: false,
99+
});
100+
});
101+
66102
it("should work with '0.0.0.0' host", async () => {
67103
const host = "0.0.0.0";
68104

0 commit comments

Comments
 (0)