Skip to content

Commit

Permalink
test: add case for open with server option (webpack#4309)
Browse files Browse the repository at this point in the history
* test: add case for `open` with `server` option

* test: add case for `open` with `server` option
  • Loading branch information
snitin315 authored Feb 23, 2022
1 parent 5481b60 commit 537eeb2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/server/open-option.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,42 @@ describe('"open" option', () => {
});
});

it("should work with the server: 'https' option", async () => {
const server = new Server(
{
open: true,
port,
server: "https",
},
compiler
);

await server.start();
await server.stop();

expect(open).toHaveBeenCalledWith(`https://localhost:${port}/`, {
wait: false,
});
});

it("should work with the server: 'spdy' option", async () => {
const server = new Server(
{
open: true,
port,
server: "spdy",
},
compiler
);

await server.start();
await server.stop();

expect(open).toHaveBeenCalledWith(`https://localhost:${port}/`, {
wait: false,
});
});

it("should work with '0.0.0.0' host", async () => {
const host = "0.0.0.0";

Expand Down

0 comments on commit 537eeb2

Please sign in to comment.