I'm trying to get the instance of my app here, and I can't find a way to get it with findInstance... here is my test
it('should call dispatchMWIUpdateError', () => {
const cmp = render(<App {...props} />);
findInstance(cmp).dispatchAction('testField', 'testValue', 'header', true);
expect(findInstance(cmp).props.appActions.dispatchMWIUpdateError).toHaveBeenCalled();
expect(props.appActions.dispatchMWIUpdateError).toHaveBeenCalled();
});
resource: testing-with-react-testing-library-using-component-instances
is there a way to get the instance of my app to test method name dispatchAction()?