I use some 3rd party api that updates my redux store with next code
createStore.dispatch(
initSdk({
config: getConfig(),
onReady: onReadyCallback,
}) as unknown as Action
);
where onReadyCallback updates redux with my custom ready flag:
const onReadyCallback = () => {
createStore.dispatch(updateServiceStatus(true));
};
How to test this callback if I have to run initSdk and cannot mock it like:
jest.mock('@someAPI/functions')
In other words how to mock onReadyCallback?