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 d4be41b commit 2c906c7Copy full SHA for 2c906c7
src/config.js
@@ -37,8 +37,11 @@ const jestConfig = {
37
38
const expectedApiVersion = '50.0';
39
40
-// Execute command is different on Windows.
41
-const jestPath =
42
- process.platform == 'win32' ? './node_modules/jest/bin/jest.js' : 'node_modules/.bin/jest';
+const jestPath = (() => {
+ const packageJsonPath = require.resolve('jest/package.json');
+ const { bin } = require(packageJsonPath);
43
+
44
+ return path.resolve(path.dirname(packageJsonPath), bin);
45
+})();
46
47
module.exports = { jestConfig, jestPath, expectedApiVersion };
0 commit comments