knee-cola / jest-mock-axios

Axios mock for Jest
252 stars 42 forks source link

Add jest.Mock to AxiosMockType interface #34

Closed moustacheful closed 5 years ago

moustacheful commented 5 years ago

This enables the default methods/properties when using Axios directly (e.g.: axios(config)).

We hit a point where we needed to check the arguments passed to the calls to a direct call of axios (axios.mock.calls), and we realized these methods and properties were missing. It would be nice to have all the power of the default jest mock functions.

kingjan1999 commented 5 years ago

Thank you very much! Looks good at first glance, will look deeper into this no later than on the weekend.

moustacheful commented 5 years ago

Awesome. Let me know if there's anything else needed for this pr to go through!