mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 09:01:39 -05:00
Fix #2496: make e2e tests exit if any single test fails
This commit is contained in:
parent
c255251658
commit
2651541ccf
4 changed files with 19 additions and 1 deletions
7
e2e_tests/failfast.js
Normal file
7
e2e_tests/failfast.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Borrowed from https://github.com/facebook/jest/issues/2867#issuecomment-546592968-permalink
|
||||
const failFast = require("jasmine-fail-fast");
|
||||
|
||||
if (process.argv.includes("--bail")) {
|
||||
const jasmineEnv = jasmine.getEnv();
|
||||
jasmineEnv.addReporter(failFast.init());
|
||||
}
|
|
@ -5,6 +5,9 @@ module.exports = {
|
|||
setupFiles: [
|
||||
"jest-webextension-mock"
|
||||
],
|
||||
setupFilesAfterEnv: [
|
||||
"e2e_tests/failfast.js"
|
||||
],
|
||||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
||||
globals: {
|
||||
"ts-jest": {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"flyd": "^0.2.8",
|
||||
"fuse.js": "^6.0.4",
|
||||
"immer": "^6.0.9",
|
||||
"jasmine-fail-fast": "^2.0.1",
|
||||
"mark.js": "^8.11.1",
|
||||
"mithril": "^2.0.4",
|
||||
"ramda": "^0.27.0",
|
||||
|
@ -54,7 +55,7 @@
|
|||
"build": "sh scripts/build.sh",
|
||||
"clean": "rm -rf build generated",
|
||||
"forrest-run": "yarn run run",
|
||||
"jest": "jest",
|
||||
"jest": "jest --bail --runInBand",
|
||||
"lint": "bash hooks/pre-commit",
|
||||
"make-zip": "web-ext build --source-dir build --overwrite-dest",
|
||||
"pretty": "bash scripts/pretty.sh",
|
||||
|
|
|
@ -4707,6 +4707,13 @@ istanbul-reports@^3.0.2:
|
|||
html-escaper "^2.0.0"
|
||||
istanbul-lib-report "^3.0.0"
|
||||
|
||||
jasmine-fail-fast@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jasmine-fail-fast/-/jasmine-fail-fast-2.0.1.tgz#222daa16c89b675aba4ed9552d62cf0d1e759d71"
|
||||
integrity sha512-En8ONwvDQOV+jyiZEZvbvUSLWSdJFj9HiWjhLdGq/V/gxs4XyST730ooe928BbRxv4bfy05OpykKuoOU4aLC5w==
|
||||
dependencies:
|
||||
lodash "^4.17.15"
|
||||
|
||||
jed@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/jed/-/jed-1.1.1.tgz#7a549bbd9ffe1585b0cd0a191e203055bee574b4"
|
||||
|
|
Loading…
Add table
Reference in a new issue