I write JavaScript unit tests using QUnit on one project and Jasmine on another. I can run thoses tests in a browser when debugging, and from the command line for continuous integration. Unit tests are fast and much more robust than Selenium tests. On one project we curently run 800 Jasmine tests in less than 20 seconds. I have written a series of blog posts on the continuous integration side of front-end JavaScript unit testing: http://www.zealake.com/2012/12/25/run-all-your-javascript-qu...