The Painful World of JavaScript Testing
April 10, 2013
One of the main reasons I like working test-first is because I’m lazy. I don’t want to fire up a browser, log in as the right person, navigate to just the right piece of data (which I had to set up manually in the database), and click around to see if things are working.
Don’t get me wrong, I do do that, but only when the code is working according to my tests. Or, when I have to write JavaScript.
At my current job, I’m doing a lot more front-end than I had been, and so more JavaScript. The app I’m working on is a Rails app, and so I looked into the current state of the art with testing JavaScript.
In can be done, and it’s painful.