From fdc6d31744ced7e3f76ceb62ccc13ffe80d65226 Mon Sep 17 00:00:00 2001 From: Yuta Hiroto Date: Sun, 9 Jun 2019 08:42:17 +0200 Subject: [PATCH] test(open-option): fix test --- test/server/open-option.test.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/server/open-option.test.js b/test/server/open-option.test.js index c0f1768b99..109798e476 100644 --- a/test/server/open-option.test.js +++ b/test/server/open-option.test.js @@ -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(() => {});