Skip to content

Commit

Permalink
test(open-option): fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroppy committed Jun 9, 2019
1 parent c89d3c1 commit fdc6d31
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/server/open-option.test.js
Expand Up @@ -21,9 +21,18 @@ describe('open option', () => {
});

compiler.hooks.done.tap('webpack-dev-server', () => {
expect(opn.mock.calls[0]).toEqual(['http://localhost:8080/', {}]);
expect(opn.mock.invocationCallOrder[0]).toEqual(1);
server.close(done);
server.close(() => {
expect(opn.mock.calls[0]).toMatchInlineSnapshot(`
Array [
"http://localhost:8080/",
Object {
"wait": false,
},
]
`);
expect(opn.mock.invocationCallOrder[0]).toEqual(1);
done();
});
});

compiler.run(() => {});
Expand Down

0 comments on commit fdc6d31

Please sign in to comment.