(Go: >> BACK << -|- >> HOME <<)

Skip to content

Latest commit

History

History
99 lines (70 loc) 路 2.31 KB

index.md

File metadata and controls

99 lines (70 loc) 路 2.31 KB
layout home_img home_primary_btn home_secondary_btn
home
/img/logo-text.svg
name href
Get Started
/intro/
name href
View the Docs
/api/

Easy

Easy, zero configuration setup for any Node.js project and minimal configuration for Browser-based projects.

Universal

QUnit can run anywhere; web browsers, Node, SpiderMonkey, even in 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

function add (a, b) {
  return a + b;
}

QUnit.module('add', hooks => {
  QUnit.test('two numbers', assert => {
    assert.equal(add(1, 2), 3);
  });
});

Browser Result

<iframe loading="lazy" title="The example test code running in the browser" src="/resources/example-add.html"></iframe>

CLI Result

TAP version 13
ok 1 add > two numbers
1..1
# pass 1
# skip 0
# todo 0
# fail 0

Current Release

v2.21.0 (changelog)

These are the officially supported release channels for QUnit:


Join the Community

Join us on [Mastodon](https://fosstodon.org/@qunit), [Twitter](https://twitter.com/qunitjs), or [Gitter chat](https://gitter.im/qunitjs/qunit).

To contribute:


What are you waiting for? Get started!