diff --git a/packages/jest-dev-server/src/global.js b/packages/jest-dev-server/src/global.js index e3ffc502..54054cf0 100644 --- a/packages/jest-dev-server/src/global.js +++ b/packages/jest-dev-server/src/global.js @@ -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; } } }