Commit d279aa03 authored by Dan Abramov's avatar Dan Abramov
Browse files

Don't generate absolute paths in Jest config after ejecting

parent 58c54836
Showing with 3 additions and 1 deletion
+3 -1
...@@ -15,7 +15,9 @@ const paths = require('../../config/paths'); ...@@ -15,7 +15,9 @@ const paths = require('../../config/paths');
module.exports = (resolve, rootDir) => { module.exports = (resolve, rootDir) => {
const setupFiles = [resolve('config/polyfills.js')]; const setupFiles = [resolve('config/polyfills.js')];
if (pathExists.sync(paths.testsSetup)) { 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 = { const config = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment