Closed marchaos closed 4 years ago
For what it's worth, the readme doesn't mention the MockProxy
type. I initially typed my mock to the thing it was mocking and then I couldn't call the jest functions on the mocked methods. Typescript was complaining. Only took me a moment to look at the code and find the MockProxy
type but could be worth a mention in the docs to help others.
I've tested out commit #c8089a786743548bf1135b4ab5d9e12355b6d5ea Both
mockClear
andmockReset
seem to be fine. I modified some tests to reset the mocks after setting return values and they started failing as expected so it's looking good to me.Thanks for this, highly appreciated.