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
Can't get Jest tests to run with reactotron-redux even after mocking reactotron-react-native with the following error - SyntaxError: Cannot use import statement outside a module
#1506
I have a React Native project and was able to setup reactotron-react-native and my tests were still working fine, but as soon as I installed reactotron-redux and set it up as per documentation, all my tests started failing with the following error - SyntaxError: Cannot use import statement outside a module.
If I remove .use(reactotronRedux()) from ReactotronConfig.js the tests start passing again. There doesn't seem to be any documentation regarding mocking so I've found my mock from other Reactotron github issues, but none of them are working for me.
I am on the latest verions of both reactotron-react-native and reactotron-redux
Describe the bug
I have a React Native project and was able to setup
reactotron-react-native
and my tests were still working fine, but as soon as I installedreactotron-redux
and set it up as per documentation, all my tests started failing with the following error -SyntaxError: Cannot use import statement outside a module.
If I remove
.use(reactotronRedux())
fromReactotronConfig.js
the tests start passing again. There doesn't seem to be any documentation regarding mocking so I've found my mock from other Reactotron github issues, but none of them are working for me.I am on the latest verions of both
reactotron-react-native
andreactotron-redux
The error looks like this:
ReactotronConfig.js
Store.js
mocks/reactotron-react-native.js
Reactotron version
5.1.8
The text was updated successfully, but these errors were encountered: