From d4b88c481df5c6bcce449b12eac1d6cfa183c5ad Mon Sep 17 00:00:00 2001 From: Vladimir Starkov Date: Thu, 23 Jan 2020 16:57:16 +0100 Subject: [PATCH 1/2] fix the hanging test in Jenkins. fix #6899 CI=true check is insufficient. It doesnt work for Jenkins, Teamcity, TaskCluster. Where Jenkins and Teamcity are big ones. --- packages/react-scripts/scripts/test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/test.js b/packages/react-scripts/scripts/test.js index 010bc2904a9..0d3f4bbf55d 100644 --- a/packages/react-scripts/scripts/test.js +++ b/packages/react-scripts/scripts/test.js @@ -33,6 +33,7 @@ verifyTypeScriptSetup(); // @remove-on-eject-end const jest = require('jest'); +const isCI = require('is-ci') const execSync = require('child_process').execSync; let argv = process.argv.slice(2); @@ -56,7 +57,7 @@ function isInMercurialRepository() { // Watch unless on CI or explicitly running all tests if ( - !process.env.CI && + !isCI && argv.indexOf('--watchAll') === -1 && argv.indexOf('--watchAll=false') === -1 ) { From bf85cb475011c39d9aa489d8b9b83175c8687342 Mon Sep 17 00:00:00 2001 From: Vladimir Starkov Date: Thu, 23 Jan 2020 17:05:25 +0100 Subject: [PATCH 2/2] add is-ci as a devDependency to support #8365 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index a9f6b18192f..d08dcda5470 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "get-port": "^4.2.0", "globby": "^9.1.0", "husky": "^1.3.1", + "is-ci": "^2.0.0", "jest": "24.9.0", "lerna": "3.19.0", "lerna-changelog": "~0.8.2",