QUnit

QUnit是一个功能强大,易于使用的JavaScript单元测试框架。(QUnit is a powerful, easy-to-use JavaScript unit testing framework. )

Github stars Tracking Chart

QUnit是一个功能强大,易于使用的JavaScript单元测试框架。 它由jQuery、jQuery UI和jQuery Mobile项目使用,并且能够测试任何通用的JavaScript代码,包括本身!

特性:

  • CLI
  • testrunner api
  • 通过istanbul测试覆盖
  • 一个测试文件中的测试运行同步,但每个测试文件并行运行
  • 每个文件的测试都在自己的生成节点进程中运行
  • 相同的API用于客户端和服务器端代码(使用原始QUnit)
  • 世界上最简单的API,特别是用于异步测试
  • 您可以根据您的任务和测试类型,以TDD或BDD样式编写测试
  • 如果没有对node的依赖,您可以在浏览器中运行相同的测试
  • 生成器支持

Overview

Name With Ownerqunitjs/qunit
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 3)
Platform
License:MIT License
Release Count81
Last Release Name2.20.1 (Posted on 2024-02-15 21:41:16)
First Release Name1.0.0 (Posted on )
Created At2009-07-24 16:26:23
Pushed At2024-04-23 00:19:41
Last Commit At
Stargazers Count4k
Watchers Count131
Fork Count786
Commits Count1.8k
Has Issues Enabled
Issues Count852
Issue Open Count59
Pull Requests Count462
Pull Requests Open Count11
Pull Requests Close Count419
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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.

To the top