Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit d279aa0

Browse files
committed
Don't generate absolute paths in Jest config after ejecting
1 parent 58c5483 commit d279aa0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/utils/createJestConfig.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ const paths = require('../../config/paths');
1515
module.exports = (resolve, rootDir) => {
1616
const setupFiles = [resolve('config/polyfills.js')];
1717
if (pathExists.sync(paths.testsSetup)) {
18-
setupFiles.push(paths.testsSetup);
18+
// Use this instead of `paths.testsSetup` to avoid putting
19+
// an absolute filename into configuration after ejecting.
20+
setupFiles.push('<rootDir>/src/setupTests.js');
1921
}
2022

2123
const config = {

0 commit comments

Comments
 (0)