From c933f524bde0fbf6ce6b1a5ace451b5f0ebb106e Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 24 Feb 2017 17:06:54 -0500 Subject: [PATCH] Use posix paths for Jest config during eject (#1635) Resolves #1417 and #1498. --- scripts/eject.js | 2 +- scripts/test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eject.js b/scripts/eject.js index 6e609c4f9f1..701907fa436 100644 --- a/scripts/eject.js +++ b/scripts/eject.js @@ -129,7 +129,7 @@ prompt( // Add Jest config console.log(' Adding ' + cyan('Jest') + ' configuration'); appPackage.jest = createJestConfig( - filePath => path.join('', filePath), + filePath => path.posix.join('', filePath), null, true ); diff --git a/scripts/test.js b/scripts/test.js index 9de5181d739..1a408215d66 100644 --- a/scripts/test.js +++ b/scripts/test.js @@ -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 )));