Skip to content

Commit 5745e7d

Browse files
committed
test(client): close browser before running test
1 parent e205363 commit 5745e7d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/e2e/ClientMode.test.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ describe('clientMode', () => {
3030
testServer.close(() => {
3131
// make sure the client gets the close message
3232
setTimeout(() => {
33-
expect(res).toMatchSnapshot();
34-
browser.close().then(done);
33+
browser.close().then(() => {
34+
expect(res).toMatchSnapshot();
35+
done();
36+
});
3537
}, 1000);
3638
});
3739
}, 3000);
@@ -66,8 +68,10 @@ describe('clientMode', () => {
6668
testServer.close(() => {
6769
// make sure the client gets the close message
6870
setTimeout(() => {
69-
expect(res).toMatchSnapshot();
70-
browser.close().then(done);
71+
browser.close().then(() => {
72+
expect(res).toMatchSnapshot();
73+
done();
74+
});
7175
}, 1000);
7276
});
7377
}, 3000);

0 commit comments

Comments
 (0)