From 1c83dae5225c3bb88e9a99cfdffeaae33a9080ae Mon Sep 17 00:00:00 2001 From: Lawrence Wang Date: Tue, 26 Mar 2019 13:18:08 -0700 Subject: [PATCH] add jest-circus this solves the issue of seeing two failures for each test in test output when beforeAll fails https://github.com/facebook/jest/issues/6695 --- package.json | 1 + test/config/jestDefaultConfig.json | 3 ++- yarn.lock | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5f0e64abf..eac4013f0 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "html-webpack-plugin": "^2.30.1", "husky": "^0.14.3", "jest": "^24.5.0", + "jest-circus": "^24.5.0", "lint-staged": "^7.1.0", "prettier": "^1.12.1", "sane": "^4.0.3", diff --git a/test/config/jestDefaultConfig.json b/test/config/jestDefaultConfig.json index c226c88f2..561424eac 100644 --- a/test/config/jestDefaultConfig.json +++ b/test/config/jestDefaultConfig.json @@ -16,5 +16,6 @@ "test" ], "setupFilesAfterEnv": ["/test/setup-test.js"], - "testPathIgnorePatterns": ["/node_modules/", "/test/integration/"] + "testPathIgnorePatterns": ["/node_modules/", "/test/integration/"], + "testRunner": "jest-circus/runner" } diff --git a/yarn.lock b/yarn.lock index 09bf7259c..6f759b768 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4794,6 +4794,29 @@ jest-changed-files@^24.5.0: execa "^1.0.0" throat "^4.0.0" +jest-circus@^24.5.0: + version "24.5.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-24.5.0.tgz#1495f9cc53f7d09381626001893cb9d12633bfa9" + integrity sha512-meGSoAA5rMv+93Wz8KY3FZcJ7aEbXqrgI2F/emPRCVzGXOvR8oQl8GvYBrIbpJW7G0vwnVSjLQMeTMHs1geu5g== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^24.5.0" + "@jest/test-result" "^24.5.0" + "@jest/types" "^24.5.0" + "@types/node" "*" + chalk "^2.0.1" + co "^4.6.0" + expect "^24.5.0" + is-generator-fn "^2.0.0" + jest-each "^24.5.0" + jest-matcher-utils "^24.5.0" + jest-message-util "^24.5.0" + jest-snapshot "^24.5.0" + jest-util "^24.5.0" + pretty-format "^24.5.0" + stack-utils "^1.0.1" + throat "^4.0.0" + jest-cli@^24.5.0: version "24.5.0" resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.5.0.tgz#598139d3446d1942fb7dc93944b9ba766d756d4b"