Skip to content

Commit

Permalink
test: close page before server (#3097)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihalgonsalves authored Apr 22, 2021
1 parent aa241e8 commit a9ce209
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/jestPerTestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ beforeAll(async () => {
}, 30000)

afterAll(async () => {
global.page && global.page.off('console', onConsole)
if (server) {
await server.close()
}
global.page?.off('console', onConsole)
await global.page?.close()
await server?.close()
if (err) {
throw err
}
Expand Down

0 comments on commit a9ce209

Please sign in to comment.