Skip to content
An easy-to-use JavaScript Unit Testing framework.
JavaScript HTML CSS Shell
Latest commit c946161 Jun 27, 2016 @shivamdixit shivamdixit committed with leobalter HTML Reporter: Fix apply/reset button visibilty
Sometimes apply/reset in module dropdown disappear
when it shouldn't. This commit fixes the behaviour
of these buttons.

Fixes gh-1013
Closes gh-1014
Failed to load latest commit information.
build Tests: Rename `random` to `seed` to reflect the documented config May 7, 2016
reporter HTML Reporter: Fix apply/reset button visibilty Jun 27, 2016
runner All: Decouple Core fixture reset from HTML reporter May 19, 2016
src Core: Ensure runtime for skipped tests is 0 Jun 27, 2016
test Core: Ensure runtime for skipped tests is 0 Jun 27, 2016
.editorconfig Build: Add .editorconfig for common editor settings Feb 23, 2014
.gitattributes Build: Update .gitattributes to fix LF on json files Mar 2, 2016
.gitignore Build: Ignore the temp/ folder Oct 21, 2015
.jscsrc Build: Also disable onevar equivalent for jscs Mar 17, 2015
.jshintrc All: Remove deprecated features Apr 18, 2016
.mailmap Authors: Fix a bad firstname, now matches CLA name Feb 12, 2014
.travis.yml Tests: Test on all Node.js releases supported by upstream May 9, 2016
AUTHORS.txt Build: Prepare 2.0.0 release, including authors and history update Jun 16, 2016
CONTRIBUTING.md All: Updated links to https where they are supported. Dec 8, 2015
Gruntfile.js All: Decouple Core fixture reset from HTML reporter May 19, 2016
History.md Build: Prepare 2.0.0 release, including authors and history update Jun 16, 2016
LICENSE.txt HTML Reporter: New diff using Google's Diff-Patch-Match Library Mar 26, 2015
README.md Readme: Add AppVeyor badge Mar 4, 2016
appveyor.yml Build: Introduce AppVeyor for Windows CI Mar 4, 2016
bower.json Build: Remove bower.json from ignored files Jan 2, 2015
package.json Build: Updating the master version to 2.0.1-pre. Jun 16, 2016

README.md

Travis Build Status AppVeyor Build Status Coverage 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, e.g. with its stop/start facilities for testing asynchronous code.

If you are interested in helping developing QUnit, you are in the right place. For related discussions, visit the QUnit and Testing forum.

Development

To submit patches, fork the repository, create a branch for the change. Then implement the change, run npm test to lint and test it, then commit, push and create a pull request.

Include some background for the change in the commit message and Fixes #nnn, referring to the issue number you're addressing.

To run npm test, you need Node.js, which includes npm.

Releases

Use jquery-release. The following aren't handled there, do that first:

  • Install git-extras and run git changelog to update History.md. Clean up the changelog, removing merge commits, whitespace cleanups or other irrelevant commits.
  • Run grunt authors and add any new authors to AUTHORS.txt
  • Update the version property in package.json to have the right -pre version. Not necessary for patch releases.

Commit these:

Build: Prepare @VERSION release, including authors and history update

Then run the script:

node release.js --remote=jquery/qunit

Update jquery/qunitjs.com, replacing previous versions with new ones:

  • pages/index.html
  • resources/*.html

Update GitHub releases, use the changelog from History.md.

Finally announce on Twitter @qunitjs (add highlights if possible, otherwise a 2nd tweet might do):

Released @VERSION: https://github.com/jquery/qunit/releases/tag/1.17.0
Something went wrong with that request. Please try again.