Using Qunit for testing JS
From Dreamwidth Notes
You can use [1] for automated testing of yor JS front-end code using jQuery and jQuery UI (the JS libraries we use for new UI development). There are some sample tests in views/dev/test/ directory.
This page needs more work.