Skip to content

Commit b4170c3

Browse files
committed
Remove unnecessary repo check
1 parent cb7b3b9 commit b4170c3

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

scripts/test.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,15 @@ process.on("unhandledRejection", (err) => {
1515
require("./testConfig/env");
1616

1717
const jest = require("jest");
18-
const execSync = require("child_process").execSync;
1918
let argv = process.argv.slice(2);
2019

21-
function isInGitRepository() {
22-
try {
23-
execSync("git rev-parse --is-inside-work-tree", { stdio: "ignore" });
24-
return true;
25-
} catch (e) {
26-
return false;
27-
}
28-
}
29-
3020
// Watch unless on CI or explicitly running all tests
3121
if (
3222
!process.env.CI &&
3323
argv.indexOf("--watchAll") === -1 &&
3424
argv.indexOf("--watchAll=false") === -1
3525
) {
36-
// https://github.com/facebook/create-react-app/issues/5210
37-
argv.push(isInGitRepository() ? "--watch" : "--watchAll");
26+
argv.push("--watchAll");
3827
}
3928

4029
jest.run(argv);

0 commit comments

Comments
 (0)