Skip to content

Commit 300fd14

Browse files
authored
Merge pull request #1589 from topcoder-platform/PM-216
PM-216
2 parents 38e5efd + 67f995d commit 300fd14

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

scripts/test.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,16 @@ process.on('unhandledRejection', err => {
1616
require('../config/env')
1717

1818
const jest = require('jest')
19-
const execSync = require('child_process').execSync
2019
let argv = process.argv.slice(2)
2120

22-
function isInGitRepository () {
23-
try {
24-
execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' })
25-
return true
26-
} catch (e) {
27-
return false
28-
}
29-
}
30-
31-
function isInMercurialRepository () {
32-
try {
33-
execSync('hg --cwd . root', { stdio: 'ignore' })
34-
return true
35-
} catch (e) {
36-
return false
37-
}
38-
}
39-
4021
// Watch unless on CI, in coverage mode, or explicitly running all tests
4122
if (
4223
!process.env.CI &&
4324
argv.indexOf('--coverage') === -1 &&
4425
argv.indexOf('--watchAll') === -1
4526
) {
4627
// https://github.com/facebook/create-react-app/issues/5210
47-
const hasSourceControl = isInGitRepository() || isInMercurialRepository()
48-
argv.push(hasSourceControl ? '--watch' : '--watchAll')
28+
argv.push('--watchAll')
4929
}
5030

5131
jest.run(argv)

0 commit comments

Comments
 (0)