Just wanted to give kudos for your videos. I'm a senior dev, finally dabbling in proper testing and I found this video really easy to understand. I was wondering though, what which point is it better to spy vs mock?
This is awesome! Was pulling my hair out yesterday dealing with jests mock hoisting and trying to change mock resolved for only a specific test, and I'm sure this will help. Why would we favour one over the other?
thanks! it was pretty clear, I just have a question, in this case the user file export the functions and you can import easily, but what happen if in my file The functions is not exported ? how can I access to that fuction in my test, hope I could be clear, greeting from mexico.
@@dev.channel To be more precise, "private" or "internal" functions are not tested *directly* but as a developer you want to be aware of this and you can design your tests to ensure all of your internal logic is behaving as intended indirectly by ensuring that the imported function returns what is expected given several different inputs that the internal logic deals with. Using the --coverage flag with Jest can help uncover untested internal code.
This is aweome Mohoo, as clear as it gets.
Best explanation i’ve come across 👌🏼
Great to hear!
Just wanted to give kudos for your videos. I'm a senior dev, finally dabbling in proper testing and I found this video really easy to understand. I was wondering though, what which point is it better to spy vs mock?
Really depends on the use case. Also they serve a bit different purpose
thanks for your explanation and straight to point tutorials
cant watch it because of the font :/
Sorry for that. I will not use that font in future videos
Why would you upload a video with that font 🤦🏽♂️ it’s so unreadable
Thanks for the feedback. I will remember to not use that :)
Excellent tutorial... Thank you!
This is awesome! Was pulling my hair out yesterday dealing with jests mock hoisting and trying to change mock resolved for only a specific test, and I'm sure this will help. Why would we favour one over the other?
thanks! it was pretty clear, I just have a question, in this case the user file export the functions and you can import easily, but what happen if in my file The functions is not exported ? how can I access to that fuction in my test, hope I could be clear, greeting from mexico.
If it’s not exported then it can’t be imported and not tested either
@@dev.channel To be more precise, "private" or "internal" functions are not tested *directly* but as a developer you want to be aware of this and you can design your tests to ensure all of your internal logic is behaving as intended indirectly by ensuring that the imported function returns what is expected given several different inputs that the internal logic deals with. Using the --coverage flag with Jest can help uncover untested internal code.
with this font it is difficult to read
Such a beautiful font! May I ask what it is?
Victor mono
Appreciate your effort so much! Thanks.
I agree the font is a bit of a challenge,... still like it tho :)
Thanks again!
You're welcome!
I really enjoyed the tutorial it was superb
Can you do this for Vitest and Prisma ORM. Thank
I will really appreciate it
Great tutorial, terrible editor fonts, my eyes are bleeding
^
Thanks for the feedback. I will not use this font in future videos
It was not that bad tbh to each his own opinion,
Great tutorial
Beautiful
Thank you
Graet