Skip to content

Commit

Permalink
perf: fix jest performances issues when running locally
Browse files Browse the repository at this point in the history
  • Loading branch information
C0ZEN committed Dec 18, 2021
1 parent 5fb7fb5 commit cb4a833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ module.exports = {
},
},

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",

maxConcurrency: 5,

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
maxWorkers: `50%`,

// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: [`./node_modules`],

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"test:watch": "jest --watch-all",
"test:watch:no-cache": "jest --watch-all --no-cache",
"test:leaks": "jest --detect-leaks",
"test:ci": "jest --bail=1 --ci",
"test:ci:coverage": "jest --collect-coverage --bail=1 --ci",
"test:ci": "jest --bail=1 --ci --maxWorkers=100%",
"test:ci:coverage": "npm run test:ci -- --collect-coverage",
"test:ci:coverage:integration:issues": "npm run test:ci:coverage -- tests/issues",
"test:ci:coverage:integration:pull-requests": "npm run test:ci:coverage -- tests/pull-requests",
"test:ci:coverage:unit": "npm run test:ci:coverage -- src",
Expand Down

0 comments on commit cb4a833

Please sign in to comment.