Thanks Yuki for writing this! I had a similar question of how to test an HTML file with vanilla JavaScript and no UI frameworks, and your article gave me a really good starting point.
Yes, testing library is quite good and it forced you not to use shallow or create lots of mocks for different functions.
I am using react-testing-library currently and it is fantastic! It is great to learn how to write unit tests using testing library and learn those best practices :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks Yuki for writing this! I had a similar question of how to test an HTML file with vanilla JavaScript and no UI frameworks, and your article gave me a really good starting point.
I ended up finding a way to do this with Jest and Kent Dodd's DOM Testing Library, and I wrote about it here: dev.to/thawkin3/how-to-unit-test-h...
Yes, testing library is quite good and it forced you not to use shallow or create lots of mocks for different functions.
I am using react-testing-library currently and it is fantastic! It is great to learn how to write unit tests using testing library and learn those best practices :)