Closed evelynhathaway closed 4 years ago
Thanks for the report!
Fixed in bb90fee, published as v4.1.0.
Thanks for getting it fixed so quickly, but I don't see the v4.1.0 version on npm yet.
That's right, I've accidentally published to the wrong registry (oops :fearful:). Fixed, should appear there soon
Oh no! It happens, so I hope everything is okay with that. On a positive note, I pulled the new version and the fix works great! Thanks again. ❤️
When calling
axios("/my/api/call")
,mockAxios.mockResponseFor({ url: "/my/api/call" })
fails to find the request because the URL string is assigned to the config property.Everything works as expected when using
axios.get("/my/api/call")
instead as a workaround.https://github.com/knee-cola/jest-mock-axios/blob/429f7716de4af53eba43e04b621c81b90792e7bb/lib/mock-axios.ts#L22-L25