mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-22 20:39:05 +08:00
Don't generate absolute paths in Jest config after ejecting
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user