You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for writing this up. I had the hardest time figuring out how to use Jest's mocking features. Your article helped me understand how mocks and spies are supposed to be used which then led me to figure out that I did not need to use manual mocks because spies worked sufficiently well.
I went through your article in great detail and wanted to share some issues I ran in to, in case it can help the next person reading your article:
mathRandomSpy.restore() should now be mathRandomSpy.mockRestore()
does not have any accompanying code that specifies a callFnWithTheMeaningOfLife function
the link to Ministry of Silly Walks video no longer works. It seems like the video has been taken down.
I had to Google how to view the results of expect(montyPython.getSillyWalk(6)).toMatchSnapshot(). Not hard to do, but as a newbie, I glossed over it without knowing I had glossed over it.
Sorry, I might have just missed some points and the above might not actually be typo's. Sorry in advance for my mistake.
Thank you so much for you generous feedback! I updated my posts based on what you said 🚀 hopefully I covered everything that you had trouble with, and I'm so happy my posts helped you understand these features!
Mocking with Jest: Spying on Functions and Changing their Implementation
Using Jest to record calls of particular methods and even change their implementation.
https://silvenon.com/blog/mocking-with-jest/functions
The text was updated successfully, but these errors were encountered: