From 364be8dc68d7d4cd9e3fe785672cd22990e86232 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Tue, 24 Jul 2018 11:12:46 +0100 Subject: [PATCH] refactor: extract common jest config --- jest.config.js | 5 ++++- package.json | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/jest.config.js b/jest.config.js index ae9625b6d8..11917a27b8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -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 } diff --git a/package.json b/package.json index b09a022cf1..98aaab7f52 100644 --- a/package.json +++ b/package.json @@ -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",