esports电竞数据网

QUnit

The powerful, easy-to-use JavaScript testing framework.

Get Started View the Docs

Easy

Zero configuration and setup for any Node.js project, and minimal setup 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

CLI Result

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

Current Release

v2.26.0 (changelog)

These are the official release channels for QUnit:


Join the Community

Follow us on Mastodon or Bluesky


What are you waiting for? Get started!

document.write("")
友情链接:k8凯发pa直营第一品牌  天生赢家一触即发凯发  k8网址  SG·胜游亚洲(中国区)官方网站  k8尊龙  中国凯发  k8凯发旗舰  K8天生赢家一触发  凯发k8彩票平台首页  金鲨银鲨飞禽走兽街机版