I have a component in my react codebase and i trying to create some snapshot tests for it, but unfortunately there is some weird error going on, jest implies that Im doing some destructuring on non-iterable instance and logs shows some thing that how ever much i tried to think about it, it would work perfectly, but i don't know what is wrong with this snippet of code shown in image below:
also please notice that i did a mock for formik
in my component like below:
jest.mock('formik', () => ({
useField: jest.fn(),
useFormikContext: jest.fn(),
}));
and every other question related to the topic either is not for jest or answer is not working and not even accepted!
any help would be appritiated!
Aucun commentaire:
Enregistrer un commentaire