refactor: extract common jest config

This commit is contained in:
Clark Du 2018-07-24 11:12:46 +01:00 committed by Clark Du
parent e814b34508
commit 364be8dc68
2 changed files with 7 additions and 4 deletions

View File

@ -7,5 +7,8 @@ module.exports = {
],
setupTestFrameworkScriptFile: './test/utils/setup',
testPathIgnorePatterns: ['test/fixtures/.*/.*?/'],
moduleFileExtensions: ['js', 'mjs', 'json']
moduleFileExtensions: ['js', 'mjs', 'json'],
expand: true,
forceExit: true,
detectOpenHandles: true
}

View File

@ -58,10 +58,10 @@
"prebuild": "yarn clean",
"security": "nsp check || true",
"test": "yarn test:fixtures && yarn test:unit",
"test:fixtures": "jest --maxWorkers=4 --forceExit --detectOpenHandles --coverage -e test/fixtures",
"test:e2e": "jest --maxWorkers=1 --forceExit --detectOpenHandles test/e2e",
"test:fixtures": "jest --maxWorkers=4 --coverage test/fixtures",
"test:e2e": "jest --maxWorkers=1 test/e2e",
"test:lint": "yarn lint && yarn security",
"test:unit": "jest --maxWorkers=4 --forceExit --detectOpenHandles --coverage -e test/unit"
"test:unit": "jest --maxWorkers=4 --coverage test/unit"
},
"engines": {
"node": ">=8.0.0",