From cff76965f6464af92403dd9e6278d3ccf6e961d8 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Tue, 24 Jul 2018 11:37:56 +0100 Subject: [PATCH] refactor: worker-pool uses default count and not collect coverage in appveyor --- .circleci/config.yml | 4 ++-- jest.config.js | 1 + package.json | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f2b7590048..3937c91d90 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,7 @@ jobs: at: ~/project - run: name: Build Fixtures - command: yarn build && yarn test:fixtures && yarn coverage + command: yarn build && yarn test:fixtures -w=4 --coverage && yarn coverage - persist_to_workspace: root: ~/project paths: @@ -65,7 +65,7 @@ jobs: at: ~/project - run: name: Unit Test - command: yarn test:unit && yarn coverage + command: yarn test:unit -w=4 --coverage && yarn coverage environment: - NODE_ENV: "test" diff --git a/jest.config.js b/jest.config.js index 11917a27b8..5ac7b3846b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -10,5 +10,6 @@ module.exports = { moduleFileExtensions: ['js', 'mjs', 'json'], expand: true, forceExit: true, + // https://github.com/facebook/jest/pull/6747 fix warning here detectOpenHandles: true } diff --git a/package.json b/package.json index 98aaab7f52..f36153dafc 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 --coverage test/fixtures", - "test:e2e": "jest --maxWorkers=1 test/e2e", + "test:fixtures": "jest test/fixtures", + "test:e2e": "jest -i test/e2e", "test:lint": "yarn lint && yarn security", - "test:unit": "jest --maxWorkers=4 --coverage test/unit" + "test:unit": "jest test/unit" }, "engines": { "node": ">=8.0.0",