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 via mail.
If you want to support me, you can buy me a coffee. I would be very happy about it!
Buy me a coffeeI wish you a wonderful day! Marco