Skip to content

Commit

Permalink
test: fix timeout hiding runtime build error (#3185)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Apr 28, 2021
1 parent 64bc35d commit 6dac751
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/jestPerTestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ beforeAll(async () => {

const options: UserConfig = {
root: tempDir,
logLevel: 'error',
logLevel: 'silent',
server: {
watch: {
// During tests we edit the files too fast and sometimes chokidar
Expand Down Expand Up @@ -100,6 +100,12 @@ beforeAll(async () => {
// jest doesn't exit if our setup has error here
// https://github.com/facebook/jest/issues/2713
err = e

// Closing the page since an error in the setup, for example a runtime error
// when building the playground should skip further tests.
// If the page remains open, a command like `await page.click(...)` produces
// a timeout with an exception that hides the real error in the console.
await page.close()
}
}, 30000)

Expand Down

0 comments on commit 6dac751

Please sign in to comment.