knee-cola / jest-mock-axios

Axios mock for Jest
252 stars 42 forks source link

Add mockResponseFor & getReqMatching #43

Closed ThiefMaster closed 4 years ago

ThiefMaster commented 4 years ago

I would have liked to support params and data in the criteria as well, but, that would have required adding e.g. lodash's isEqual or a similar library as a dependency (for deep object comparison). I tried adding it, but something with the ES module imports was breaking ("is_equal_1.default is not a function" and similar errors no matter which library i tried (lodash.isequal, lodash, lodash-es, is-equal)).

closes #42

kingjan1999 commented 4 years ago

Thank you very much! Can you just add these new functions to the README as well?

ThiefMaster commented 4 years ago

done

kingjan1999 commented 4 years ago

Merged, thank you very much!