We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70853d6 commit af864c1Copy full SHA for af864c1
src/utils/test-runner.js
@@ -32,7 +32,14 @@ function getJestPath() {
32
const packageJsonPath = require.resolve('jest/package.json');
33
34
const { bin } = require(packageJsonPath);
35
- return path.resolve(path.dirname(packageJsonPath), bin);
+
36
+ // Account for difference in behavior between npm v6 and v7 (#221)
37
+ let normalizedBinPath = bin;
38
+ if (typeof bin === 'object') {
39
+ normalizedBinPath = bin.jest;
40
+ }
41
42
+ return path.resolve(path.dirname(packageJsonPath), normalizedBinPath);
43
}
44
45
function getJestArgs(argv) {
0 commit comments