In an exploration of the best tools to perform unit testing on JavaScript code, Matthew Setter explores how QUnit can perform this task. QUnit is an open source JavaScript unit testing framework that is used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code.
After a short explanation on how to install QUnit, he plays with it on some JavaScript code starting with some basic unit test and then enhancing it. His conclusion are that QUnit is “one of the simplest and most effective unit testing libraries for JavaScript.” and that he was surprised by its functionality as he had expected it to be less capable that what he found it to be. The blog post provide also some further reading material about QUnit.
Read the complete article on http://blog.newrelic.com/2013/05/15/new-simple-javascript-testing-with-qunit/