diff --git a/scripts/jest/config.source-persistent.js b/scripts/jest/config.source-persistent.js index 388d906c2b247..63c95c5584ba2 100644 --- a/scripts/jest/config.source-persistent.js +++ b/scripts/jest/config.source-persistent.js @@ -17,6 +17,9 @@ const moduleNameMapper = {}; moduleNameMapper[ '^react$' ] = `/packages/react/index${preferredExtension}`; +moduleNameMapper[ + '^react-dom$' +] = `/packages/react-dom/index${preferredExtension}`; module.exports = Object.assign({}, baseConfig, { // Prefer the stable forks for tests. diff --git a/scripts/jest/config.source.js b/scripts/jest/config.source.js index 9b3179e0f841d..18f44e3b72160 100644 --- a/scripts/jest/config.source.js +++ b/scripts/jest/config.source.js @@ -17,6 +17,9 @@ const moduleNameMapper = {}; moduleNameMapper[ '^react$' ] = `/packages/react/index${preferredExtension}`; +moduleNameMapper[ + '^react-dom$' +] = `/packages/react-dom/index${preferredExtension}`; module.exports = Object.assign({}, baseConfig, { // Prefer the stable forks for tests.