An easy-to-use JavaScript Unit Testing framework.
Clone or download
Permalink
Failed to load latest commit information.
.github Readme: Add ISSUE_TEMPLATE with issue guidelines to repository (#1104) Feb 27, 2017
bin CLI: [fixes #121] chokidar -> sane (#1283) Jul 30, 2018
build Build: Upgrade grunt-contrib-qunit to 3.x (Headless Chrome) Aug 20, 2018
docs Docs: Fix Jekyll build (remove conflicting file/dir names) Jun 18, 2018
reporter HTML Reporter: Disable autocomplete on module search input (#1277) May 7, 2018
runner HTML Reporter: Ensure attributes on qunit-fixture are reset. Jan 17, 2018
src reports/suite: Use performance API to add "User Timings" Sep 19, 2018
test Build: Upgrade grunt-contrib-qunit to 3.x (Headless Chrome) Aug 20, 2018
.babelrc Build: Use babel-preset-env and .babelrc Dec 15, 2017
.editorconfig Build: Add .editorconfig for common editor settings Feb 23, 2014
.eslintrc.json All: Enable ESLint recommended rules Apr 10, 2018
.gitattributes Tests: HTML files should end with LF Dec 5, 2016
.gitignore Docs: Migrate api docs (#1135) Mar 31, 2017
.mailmap Build: Add my new name to .mailmap, update it in AUTHORS.txt Oct 19, 2017
.travis.yml Build: Remove Browserstack Aug 19, 2018
AUTHORS.txt Build: Prepare 2.6.2 release, includin authors and history update Aug 19, 2018
CONTRIBUTING.md Docs: Update README/CONTRIBUTING with more recent/relevant information May 29, 2017
Gruntfile.js Build: Upgrade grunt-contrib-qunit to 3.x (Headless Chrome) Aug 20, 2018
History.md Build: Prepare 2.6.2 release, includin authors and history update Aug 19, 2018
LICENSE.txt All: Update License to JSFoundation Nov 1, 2016
README.md Docs: Update README/CONTRIBUTING with more recent/relevant information May 29, 2017
RELEASE.md All: Rename package to qunit from qunitjs Nov 5, 2017
appveyor.yml Core: Updates for Node.js version 8 compatibility and testing Jun 2, 2017
bower.json Build: Use SPDX format in bower.json's license Sep 6, 2016
package-lock.json Build: Upgrade grunt-contrib-qunit to 3.x (Headless Chrome) Aug 20, 2018
package.json Build: Upgrade grunt-contrib-qunit to 3.x (Headless Chrome) Aug 20, 2018
rollup.config.js Build: Use babel-preset-env and .babelrc Dec 15, 2017
yarn.lock Build: Upgrade grunt-contrib-qunit to 3.x (Headless Chrome) Aug 20, 2018

README.md

Travis Build Status AppVeyor Build Status Coverage Status Chat on Gitter FOSSA Status

QUnit - A JavaScript Unit Testing Framework.

QUnit is a powerful, easy-to-use, JavaScript unit testing framework. It's used by the jQuery project to test its code and plugins but is capable of testing any generic JavaScript code (and even capable of testing JavaScript code on the server-side).

QUnit is especially useful for regression testing: Whenever a bug is reported, write a test that asserts the existence of that particular bug. Then fix it and commit both. Every time you work on the code again, run the tests. If the bug comes up again - a regression - you'll spot it immediately and know how to fix it, because you know what code you just changed.

Having good unit test coverage makes safe refactoring easy and cheap. You can run the tests after each small refactoring step and always know what change broke something.

QUnit is similar to other unit testing frameworks like JUnit, but makes use of the features JavaScript provides and helps with testing code in the browser, such as built in support for asynchronicity and exception handling.

Support

If you need help using QUnit, visit the QUnit and Testing forum or chat with us on Gitter.

If you believe there is a bug with QUnit or would like to request a new feature, open an issue.

Development / Contributions

If you are interested in helping develop QUnit, check out our contributing guide.