Skip to content

Commit

Permalink
Use posix paths for Jest config during eject (#1635)
Browse files Browse the repository at this point in the history
Resolves #1417 and #1498.
  • Loading branch information
Timer committed Feb 24, 2017
1 parent 78882d5 commit 913679b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ prompt(
// Add Jest config
console.log(' Adding ' + cyan('Jest') + ' configuration');
appPackage.jest = createJestConfig(
filePath => path.join('<rootDir>', filePath),
filePath => path.posix.join('<rootDir>', filePath),
null,
true
);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const createJestConfig = require('../utils/createJestConfig');
const path = require('path');
const paths = require('../config/paths');
argv.push('--config', JSON.stringify(createJestConfig(
relativePath => path.resolve(__dirname, '..', relativePath),
relativePath => path.posix.resolve(__dirname.replace(/[\\]+/g, path.posix.sep), '..', relativePath),
path.resolve(paths.appSrc, '..'),
false
)));
Expand Down

0 comments on commit 913679b

Please sign in to comment.