Skip to content

Commit f6c20ab

Browse files
authored
fix: only throw timed out error if timed out (#435)
1 parent 3d6cae0 commit f6c20ab

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/jest-dev-server/src/global.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,14 @@ async function setupJestServer(providedConfig, index) {
207207
try {
208208
await waitOn(opts)
209209
} catch (err) {
210-
throw new JestDevServerError(
211-
`Server has taken more than ${launchTimeout}ms to start.`,
212-
ERROR_TIMEOUT,
213-
)
210+
if (err.message.startsWith("Timed out")) {
211+
throw new JestDevServerError(
212+
`Server has taken more than ${launchTimeout}ms to start.`,
213+
ERROR_TIMEOUT,
214+
)
215+
}
216+
217+
throw err;
214218
}
215219
}
216220
}

0 commit comments

Comments
 (0)