Unit testing a jQuery plugin with QUnit

QUnit is a powerful, yet easy-to-use JavaScript unit testing framework. It is used by the jQuery, jQuery UI and jQuery Mobile projects and it is well suited for testing a typical jQuery plugin. This article builts upon Getting Started with QUnit, How to Test Asynchronous Code with QUnit and of course the official Introduction to Unit Testing articles so feel free to skim through those first and return to see how QUnit can be used to test an already built jQuery plugin, and get you started with unit testing.
Continue reading…