Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Reactotron while running detox tests #1220

Open
mehmetnyarar opened this issue Mar 18, 2021 · 1 comment
Open

Using Reactotron while running detox tests #1220

mehmetnyarar opened this issue Mar 18, 2021 · 1 comment

Comments

@mehmetnyarar
Copy link

I'd like to use Reactotron while running detox tests but getting the following error:

import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
^^^^^^
SyntaxError: Cannot use import statement outside a module
1 | import AsyncStorage from '@react-native-async-storage/async-storage';
2 | import Reactotron from 'reactotron-react-native';
| ^
3 | import { reactotronRedux as reduxPlugin } from 'reactotron-redux';
4 | import sagaPlugin from 'reactotron-redux-saga';

How can I get rid of this error and use Reactotron?

package.json:

"jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ],
    "transformIgnorePatterns": [
      "node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base)"
    ],
    "setupFilesAfterEnv": [
      "<rootDir>/__mocks__/globalMock.js"
    ]
  },

"react-native": "0.63.3",
"reactotron-react-native": "^5.0.0",
"reactotron-redux": "^3.1.3",
"reactotron-redux-saga": "^4.2.3",

@HughMCWJR
Copy link

I'm having a similar issue, any chance you remember/fixed this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants