Since this is the first search result, I wanted to drop another hint for those who encounter this problem with a native-network reaction and a joke.
As described in detail at https://github.com/facebookincubator/create-react-app/issues/1085 , if you map react-native to react-native-web in your system assembly (webpack, for me) then you will also need this mapping in your jest configuration.
I have seen
ReferenceError: __DEV__ is not defined
when I ran tests through a joke. Adding
moduleNameMapper: { '^react-native$': 'react-native-web', }
to jest.config.js fixed this for me.
rrcobb
source share