End to End Testing (with React)
Edit I now prefer webdriver.io. It's SO much nicer. I may write a post on it soon, but this post still may help you :)
Recently, I read an article on testing that said unit tests are pointless. I'm inclined to agree. Why not focus on writing integration tests? Hit a part of your app and test every possible input and output. Why worry about the smallest parts in your app? This way, you can refactor those unit sized pieces without rewriting tests. With that being said, I am not advocating to take it a step further and only write end to end tests. Just wanted to make you think a little about your testing strategy.
Personally, if I am writing both the backend and frontend on a site, I am completely fine with integration testing the whole backend, and then testing the entire frontend through in-browser tests. If you can cover every part of your app this way, I see no point in unit tests. Sure, they may make you feel better, but are they needed? If I run a test in the browser that toggles thr…
Keep reading with a 7-day free trial
Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.