Skip to content

Commit

Permalink
Configure jest to use stable entry for ReactDOM in non-experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Feb 24, 2020
1 parent 718be6e commit dffaf7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/jest/config.source-persistent.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const moduleNameMapper = {};
moduleNameMapper[
'^react$'
] = `<rootDir>/packages/react/index${preferredExtension}`;
moduleNameMapper[
'^react-dom$'
] = `<rootDir>/packages/react-dom/index${preferredExtension}`;

module.exports = Object.assign({}, baseConfig, {
// Prefer the stable forks for tests.
Expand Down
3 changes: 3 additions & 0 deletions scripts/jest/config.source.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const moduleNameMapper = {};
moduleNameMapper[
'^react$'
] = `<rootDir>/packages/react/index${preferredExtension}`;
moduleNameMapper[
'^react-dom$'
] = `<rootDir>/packages/react-dom/index${preferredExtension}`;

module.exports = Object.assign({}, baseConfig, {
// Prefer the stable forks for tests.
Expand Down

0 comments on commit dffaf7f

Please sign in to comment.