Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

Jest throws error due to ReactNavigation particularly Drawer(i think) TypeError: Cannot read property 'create' of undefined

$
0
0

I keep gettingTypeError: Cannot read property 'create' of undefined and i believe it is because of react-Navigation Drawer

const App = () => {  return <AppContainer />;};

import 'react-native';import * as React from 'react';import App from '../App';// Note: test renderer must be required after react-native.import renderer from 'react-test-renderer';it('renders correctly', () => {  renderer.create(<App />);});
"jest": {"preset": "react-native","moduleFileExtensions": ["ts","tsx","js","jsx","json","node"    ],"transformIgnorePatterns": ["node_modules/(?!react-native|react-navigation)/"    ],"setupFiles": ["./node_modules/react-native-gesture-handler/jestSetup.js","./testenv.js"    ]  }

Viewing all articles
Browse latest Browse all 6211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>