Skip to content

Commit fdc6d31

Browse files
committed
test(open-option): fix test
1 parent c89d3c1 commit fdc6d31

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

test/server/open-option.test.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,18 @@ describe('open option', () => {
2121
});
2222

2323
compiler.hooks.done.tap('webpack-dev-server', () => {
24-
expect(opn.mock.calls[0]).toEqual(['http://localhost:8080/', {}]);
25-
expect(opn.mock.invocationCallOrder[0]).toEqual(1);
26-
server.close(done);
24+
server.close(() => {
25+
expect(opn.mock.calls[0]).toMatchInlineSnapshot(`
26+
Array [
27+
"http://localhost:8080/",
28+
Object {
29+
"wait": false,
30+
},
31+
]
32+
`);
33+
expect(opn.mock.invocationCallOrder[0]).toEqual(1);
34+
done();
35+
});
2736
});
2837

2938
compiler.run(() => {});

0 commit comments

Comments
 (0)