From db4b3717b7091e46d9da35067c204cefec6d04e1 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Wed, 19 Sep 2018 14:47:19 +0200 Subject: [PATCH] test(jest): run jest with --forceExit flag Jest is sometimes unable to detect when tests have completed which can result in tests hanging indefinitely, which breaks our CI builds on Appveyor. This is a know issue in jest and they added a `forceExit` in order to help users facing this issue. See https://github.com/facebook/jest/issues/1456 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c92f0b36..09a5413e 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "start-main-dev": "cross-env HOT=1 NODE_ENV=development electron -r babel-register ./app/main.dev", "start-renderer-dev": "node --trace-warnings -r babel-register ./node_modules/webpack-serve/lib/cli.js --config internals/webpack/webpack.config.renderer.dev.js", "test": "npm run lint && npm run lint-styles && npm run flow && npm run build && npm run test-unit && npm run test-e2e", - "test-base": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=true ELECTRON_DISABLE_SECURITY_WARNINGS=true node --trace-warnings ./node_modules/jest/bin/jest", + "test-base": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=true ELECTRON_DISABLE_SECURITY_WARNINGS=true node --trace-warnings ./node_modules/jest/bin/jest --forceExit", "test-unit": "npm run test-base -- ./test/unit", "test-e2e": "npm run test-base -- ./test/e2e", "test-ci": "npm run test-e2e && npm run test-unit"