Skip to content

Commit

Permalink
Use at least one worker by default (fixes jestjs#7181)
Browse files Browse the repository at this point in the history
  • Loading branch information
biomedia-thomas authored Oct 16, 2018
1 parent 081e155 commit e40c4e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jest-worker/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class {
_offset: number;

constructor(workerPath: string, options?: FarmOptions = {}) {
const numWorkers = options.numWorkers || os.cpus().length - 1;
const numWorkers = options.numWorkers || Math.max(os.cpus().length - 1, 1);
const workers = new Array(numWorkers);
const stdout = mergeStream();
const stderr = mergeStream();
Expand Down

0 comments on commit e40c4e6

Please sign in to comment.