Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
d279aa03
Commit
d279aa03
authored
8 years ago
by
Dan Abramov
Browse files
Options
Download
Email Patches
Plain Diff
Don't generate absolute paths in Jest config after ejecting
parent
58c54836
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/utils/createJestConfig.js
+3
-1
scripts/utils/createJestConfig.js
with
3 additions
and
1 deletion
+3
-1
scripts/utils/createJestConfig.js
+
3
-
1
View file @
d279aa03
...
@@ -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
=
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment