What is QUnit?
A minimal QUnit test setup:
The contents of tests.js:
QUnit supports the same browsers as jQuery 1.x.
That's IE6+ and Current - 1 for Chrome, Firefox, Safari and Opera.
Current Release - v1.18.0
To test the latest features and bug fixes to QUnit, a version automatically generated from the latest commit to the QUnit Git repository is also available for use.
- Check out the API documentation or the Cookbook to learn how to use QUnit
- To see more examples, check out the unit tests of jQuery, jQuery UI or the jQuery Validation Plugin.
- For custom assertions, reporters and themes, check out official and third-party plugins
- Please post to the QUnit and testing forum for anything related to QUnit or testing in general.
- For announcements, follow @qunitjs
- The code is located at: https://github.com/jquery/qunit
- The code for this site is also on GitHub, with the API pages in a separate repository.
- Find the QUnit team in #jquery-dev on Freenode.
QUnit was originally developed by John Resig as part of jQuery. In 2008 it got its own home, name and API documentation, allowing others to use it for their unit testing as well. At the time it still depended on jQuery. A rewrite in 2009 fixed that, and now QUnit runs completely standalone.
QUnit's assertion methods follow the CommonJS Unit Testing specification, which was to some degree influenced by QUnit.