You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After integrating Pendo SDK for React Native with React Navigation, Jest tests are failing with the following error:
FAIL src/components/Button/Button.test.tsx
● Test suite failed to run
Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.
at invariant (node_modules/invariant/invariant.js:40:15)
at new NativeEventEmitter (node_modules/react-native/Libraries/EventEmitter/NativeEventEmitter.js:44:7)
at Object.<anonymous> (node_modules/rn-pendo-sdk/lib/pendoRNN.js:1:766)
at Object.<anonymous> (node_modules/rn-pendo-sdk/lib/pendoAPI.js:1:723)
Not sure if there needs to be a Jest setup for PendoSDK. Test cases are failing for even simple presentation components, e.g.:
import React from 'react';
import { render } from 'test-utils';
import { Button } from './Button';
describe('Button', () => {
it('should render without error', () => {
expect(render(<Button>Test</Button>)).toBeTruthy();
});
});
What should be done to make PendoSDK pass Jest unit tests?
The text was updated successfully, but these errors were encountered:
@shariq-muhammad
Please have a look at how jest should be configured. I have the same error but after additional configurations (which is not related to Pendo the test start to work).
I have created separated PR for that u can look at the branch APP-69568.
Please note u will need explicitly mock Pendo if needed .
Basically the same error can be found here
After integrating Pendo SDK for React Native with React Navigation, Jest tests are failing with the following error:
Not sure if there needs to be a Jest setup for PendoSDK. Test cases are failing for even simple presentation components, e.g.:
What should be done to make PendoSDK pass Jest unit tests?
The text was updated successfully, but these errors were encountered: