Easy
Easy, zero configuration setup for any Node.js project and minimal configuration for Browser-based projects.
Universal
Tests can be run anywhere; Node, your browser, even inside a Web Worker. Test your code where it runs.
Extensible
Flexible APIs for custom assertions, runners, and reporters mean you can extend QUnit to fit your needs.
A Quick Example
const add = (a, b) => a + b;
QUnit.module('add', function() {
QUnit.test('should add two numbers', function(assert) {
assert.equal(add(1, 1), 2, '1 + 1 = 2');
});
});
Browser Result
CLI Result
TAP version 13
ok 1 add > should add two numbers
1..1
# pass 1
# skip 0
# todo 0
# fail 0
Current Release
v2.14.0 (changelog)
These are the officially supported download channels for QUnit releases:
- npm:
npm install --save-dev qunit
- Yarn:
yarn add --dev qunit
- Bower:
bower install --save-dev qunit
- CDN:
qunit-2.14.0.js
&qunit-2.14.0.css
Join the Community
Join us on Mastodon, Twitter, or Gitter chat.
To contribute:
- Watch the repository to learn about release, new requests, or bug reports.
- The source of this website, is in the qunitjs.com repository.
- The source of the Documentation site, is in the “docs/” directory.
What are you waiting for? Get started!