Skip to content

Commit

Permalink
fix(jest-dev-server): do not scan process if usedPortAction is "ignore"
Browse files Browse the repository at this point in the history
Closes #96
  • Loading branch information
gregberge committed Nov 3, 2018
1 parent 29ed74f commit cceb0bd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/jest-dev-server/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,11 @@ async function outOfStin(block) {
export async function setup(config) {
config = { ...DEFAULT_CONFIG, ...config }

if (config.port) {
if (config.port && config.usedPortAction !== 'ignore') {
const [portProcess] = await findProcess('port', config.port)

if (portProcess && portProcess.pid > 0) {
switch (config.usedPortAction) {
case 'ignore':
console.log('')
logProcDetection(portProcess, config.port)
return
case 'error':
throw new JestDevServerError(
`Port ${config.port} is already used by ${
Expand Down

0 comments on commit cceb0bd

Please sign in to comment.