Today I learned
Fun with testing
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: https://testing-library.com/docs/intro
I hope you enjoyed this post and learned something new. If you have any questions, feel free to reach out to me on Twitter ↗ or via Email ↗.
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