Today I learned

Fun with testing

Edit this Post Opens in new tab

Today I learned, once again, how well done the react-testing-library is. It is purely focused on testing if your code works for your users instead of testing implementation details. We refactored a lot of old tests last week and found some, which tested if a click on a button calls a specific function. ๐Ÿ™„ Not really helpful! Refactoring it to "this should happen to the user if he clicks it" felt so much better.',

Learn more:

I hope you enjoyed this post and learned something new. If you have any questions, feel free to reach out to me on Twitter Opens in new tab or via Email Opens in new tab.

If you want to support me, you can buy me a coffee. I would be very happy about it!

โ˜•๏ธ Buy me a coffee โ˜•๏ธ

I wish you a wonderful day! Marco