Skip to content
This repository was archived by the owner on Mar 25, 2022. It is now read-only.

ReferenceError: __DEV__ is not defined #5

Open
jrm2k6 opened this issue Sep 13, 2016 · 0 comments
Open

ReferenceError: __DEV__ is not defined #5

jrm2k6 opened this issue Sep 13, 2016 · 0 comments

Comments

@jrm2k6
Copy link

jrm2k6 commented Sep 13, 2016

I am trying to unit tests some of my RN components with ava.

I have the following in my package.json:

"babel": {
    "presets": ["react-native", "es2015"],
    "plugins": ["react-native-config-node/transform"],
    "ignore": false
  },
  "ava": {
    "babel": "inherit",
    "files": [
      "app/__tests__/*",
      "!app/__tests__/testHelper.js"
    ],
    "require": [
      "babel-register",
      "babel-polyfill"
    ],
    "source": [
      "app/*"
    ]
  }

When I try to run my tests, I got an error with the following stacktrace:

/Users/jrm2k6/Workspace/local.dev/my-companion/node_modules/react-native/Libraries/react-native/react-native.js:15
if (__DEV__) {
    ^

ReferenceError: __DEV__ is not defined

I have another project using this package in combination with react-native-config, but using mocha instead of ava, and just pulling this package worked. I have pretty much the same config in there. Any idea how I could fix that?

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

No branches or pull requests

1 participant