knee-cola / jest-mock-axios

Axios mock for Jest
252 stars 42 forks source link

Breaking in change in minor version bump 2.3.0 #25

Closed tclain closed 5 years ago

tclain commented 5 years ago

Hi,

it seems that the new version you just published contains a breaking change from 2.1.11. Using it from typescript the spyFn function does not contains mock anymore, breaking tests :-(

Is it intended ?

Thanks

kingjan1999 commented 5 years ago

Hi,

if I understand your problem correctly, that's not actually a breaking change (technically). The type SpyFn never really contained a full mock object (as returned from jest), only mockClear. I think this problem occurs because 2.3.0 loads the type definition correctly. Do I see this correctly or have I misunderstood something?

Anyway, I have already detected and fixed the described problem (2da7e197ed4f2d3547ce7082354beaa016c9ee1c), the fix should be included in 2.4.0, which should be published soon.

tclain commented 5 years ago

Thanks for the quick answer, that's perfect