kentcdodds / js-mocking-fundamentals

JavaScript Mocking Fundamentals on TestingJavaScript.com

Home Page:https://testingjavascript.com/courses/javascript-mocking-fundamentals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jest.spyOn behaviour

Miklet opened this issue · comments

Hi Kent!

I would like to ask you about jest.spyOn. In your course you have mentioned that spyOn does replace original implementation with an empty mock function. According to Jest's documentation and my own experience with using that function it doesn't by default. Was that a mistake :)?

Cheers and thank you for your awesome job!

You're correct. Where do I say that?

Yep. That's wrong. Thanks for letting me know. I'll look into getting that fixed.

You're welcome!

This has been fixed. Thanks!