Skip to content

Commit

Permalink
fix: only throw timed out error if timed out (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech authored Sep 22, 2021
1 parent 3d6cae0 commit f6c20ab
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/jest-dev-server/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,14 @@ async function setupJestServer(providedConfig, index) {
try {
await waitOn(opts)
} catch (err) {
throw new JestDevServerError(
`Server has taken more than ${launchTimeout}ms to start.`,
ERROR_TIMEOUT,
)
if (err.message.startsWith("Timed out")) {
throw new JestDevServerError(
`Server has taken more than ${launchTimeout}ms to start.`,
ERROR_TIMEOUT,
)
}

throw err;
}
}
}
Expand Down

0 comments on commit f6c20ab

Please sign in to comment.