Skip to content

Commit

Permalink
fix: do not attempt to start the server when usedPortAction is `ign…
Browse files Browse the repository at this point in the history
…ore` and `isPortTaken` is `true` (#219)
  • Loading branch information
brandonaaron authored and gregberge committed Apr 3, 2019
1 parent f3bb941 commit 7df3721
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/jest-dev-server/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,16 @@ async function setupJestServer(providedConfig, index) {
if (isPortTaken) {
await usedPortHandler()
}
}

runServer(config, index)
if (config.usedPortAction === 'ignore' && isPortTaken) {
console.log('')
console.log('Port is already taken. Assuming server is already running.')
} else {
runServer(config, index)
}
} else {
runServer(config, index)
}

if (config.port) {
const { launchTimeout } = config
Expand Down

0 comments on commit 7df3721

Please sign in to comment.