Skip to content

Commit

Permalink
Don't generate absolute paths in Jest config after ejecting
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Sep 18, 2016
1 parent 58c5483 commit d279aa0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const paths = require('../../config/paths');
module.exports = (resolve, rootDir) => {
const setupFiles = [resolve('config/polyfills.js')];
if (pathExists.sync(paths.testsSetup)) {
setupFiles.push(paths.testsSetup);
// Use this instead of `paths.testsSetup` to avoid putting
// an absolute filename into configuration after ejecting.
setupFiles.push('<rootDir>/src/setupTests.js');
}

const config = {
Expand Down

0 comments on commit d279aa0

Please sign in to comment.