Skip to content

Commit

Permalink
Cleanup started process (#27)
Browse files Browse the repository at this point in the history
* Fix package vulnerability

* Cleanup started process
  • Loading branch information
mmarkelov authored Dec 14, 2020
1 parent 254b584 commit 75830ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ async function setupJestServer(providedConfig: JestProcessManagerOptions, index:
try {
await waitOn(opts)
} catch (err) {
const [portProcess] = await findProcess('port', config.port)
if (portProcess) {
await killProc(portProcess)
}
throw new JestProcessManagerError(
`Server has taken more than ${launchTimeout}ms to start.`,
ERROR_TIMEOUT,
Expand Down

0 comments on commit 75830ba

Please sign in to comment.