Skip to content

Commit

Permalink
Properly configure unit test script to improve local dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mkreiser committed Oct 21, 2023
1 parent 43511bd commit e00667f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions jest-integration-tests.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
clearMocks: true,
collectCoverage: false,
restoreMocks: true,
testEnvironment: 'node',
testMatch: ['**/integration-tests/**/?(*.)+(spec|test).[jt]s?(x)'],
transform: {
'^.+\\.js$': 'babel-jest'
}
};
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
coverageDirectory: 'coverage',
restoreMocks: true,
testEnvironment: 'node',
testMatch: ['**/src/**/?(*.)+(spec|test).[jt]s?(x)'],
transform: {
'^.+\\.js$': 'babel-jest'
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"lint": "eslint integration-tests/**/*.js src/**/*.js",
"prepublishOnly": "npm run build",
"serve:docs": "npm run build:docs && http-server ./docs -c-1",
"test": "jest src --maxWorkers=2",
"test:integration": "jest integration-tests --maxWorkers=2 --coverage=false"
"test": "jest --maxWorkers=2",
"test:integration": "jest --maxWorkers=2 --config=jest-integration-tests.config.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit e00667f

Please sign in to comment.