TypeError: Cannot read property 'pushListener' of undefined
at ExNavigationAndroidBackButtonBehavior.enable (node_modules\@exponent\ex-navigation\src\ExNavigationAndroidBackButtonBehavior.js:55:14)
at ExNavigationAndroidBackButtonBehavior.componentDidMount (node_modules\@exponent\ex-navigation\src\ExNavigationAndroidBackButtonBehavior.js:29:6)
at node_modules\react-test-renderer\lib\ReactCompositeComponent.js:265:25
at measureLifeCyclePerf (node_modules\react-test-renderer\lib\ReactCompositeComponent.js:75:12)
at node_modules\react-test-renderer\lib\ReactCompositeComponent.js:264:11
at CallbackQueue.notifyAll (node_modules\react-test-renderer\lib\CallbackQueue.js:76:22)
at ReactTestReconcileTransaction.close (node_modules\react-test-renderer\lib\ReactTestReconcileTransaction.js:36:26)
at ReactTestReconcileTransaction.closeAll (node_modules\react-test-renderer\lib\Transaction.js:206:25)
at ReactTestReconcileTransaction.perform (node_modules\react-test-renderer\lib\Transaction.js:153:16)
at batchedMountComponentIntoNode (node_modules\react-test-renderer\lib\ReactTestMount.js:69:27)
So far I have this in my test
jest.mock("bugsnag-react-native", () => 'BugSnag')
jest.mock('react-native-intercom', () => 'Intercom')
jest.genMockFromModule('@exponent/ex-navigation')
import 'react-native';
import React from 'react';
import LoginScreen from '../../app/Screens/loginScreen';
import renderer from 'react-test-renderer';
test('renders correctly', () => {
const tree = renderer.create(
<LoginScreen />
).toJSON();
expect(tree).toMatchSnapshot();
});
Hitting this error.
TypeError: Cannot read property 'pushListener' of undefined
So far I have this in my test
And this in my package.config
Thanks for any input!