You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Hot Loader is reporting the following error when using the react-hot-loader/babel plugin and attempting to run tests with jest.
PASS src/App.test.jsx
App
✓ renders (10ms)
console.error node_modules/react-hot-loader/index.js:9
React-Hot-Loader: Hot Module Replacement is not enabled
Expected behavior
When using the babel plugin it should not report this error when executing in the test context.
Actual behavior
See error above, it is still attempting to load react-hot-loader when running tests. The reason I know this is the babel plugin is because the error goes away when I remove the plugin from .babelrc.
Environment
React Hot Loader version: 4.8.3
Run these commands in the project folder and fill in their results:
node -v: 10.15.3
yarn -v: `1.15.2
Then, specify:
Operating system: OS X 10.14.4
Reproducible Demo
App.jsx
importReactfrom'react';import{hot}from'react-hot-loader/root';constApp=()=>(<div>Here is my app</div>);exportdefaulthot(App);
/* eslint-disable max-len */process.env.BABEL_ENV='test';// Make sure to load the appropriate babel pluginsprocess.env.NODE_ENV='test';// set the proper node envmodule.exports={setupFilesAfterEnv: ['<rootDir>/scripts/setupTests.js'],snapshotSerializers: ['enzyme-to-json/serializer'],moduleDirectories: ['node_modules','src'],};
The text was updated successfully, but these errors were encountered:
Description
React Hot Loader is reporting the following error when using the
react-hot-loader/babel
plugin and attempting to run tests withjest
.Expected behavior
When using the babel plugin it should not report this error when executing in the test context.
Actual behavior
See error above, it is still attempting to load
react-hot-loader
when running tests. The reason I know this is the babel plugin is because the error goes away when I remove the plugin from.babelrc
.Environment
React Hot Loader version:
4.8.3
Run these commands in the project folder and fill in their results:
node -v
:10.15.3
yarn -v
: `1.15.2Then, specify:
OS X 10.14.4
Reproducible Demo
App.jsx
App.test.jsx
.babelrc
package.json
jest.config.js
The text was updated successfully, but these errors were encountered: