infinitered / reactotron

A desktop app for inspecting your React JS and React Native projects. macOS, Linux, and Windows.
https://docs.infinite.red/reactotron/
MIT License
14.83k stars 943 forks source link

Using Reactotron while running detox tests #1220

Open mehmetnyarar opened 3 years ago

mehmetnyarar commented 3 years ago

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 commented 2 years ago

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