色々ありすぎる…
Testing Framework / Test runner
-
Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.
-
- Minimal and fast
- Simple test syntax
- Runs tests concurrently
- Enforces writing atomic tests
- No implicit globals
- Includes TypeScript & Flow type definitions
- Magic assert
- Isolated environment for each test file
- Write your tests in ES2017
- Promise support
- Generator function support
- Async function support
- Observable support
- Enhanced assertion messages
- TAP reporter
- Automatic migration from other test runners
- Minimal and fast
-
Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
-
🃏 Painless JavaScript Testing
- 👩🏻💻 Easy Setup: Jest is a complete and easy to set up JavaScript testing solution. In fact, Jest works out of the box for any React project.
- 🏃🏽 Instant Feedback: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files.
- 📸 Snapshot Testing: Jest can capture snapshots of React trees or other serializable values to simplify UI testing.
- 👩🏻💻 Easy Setup: Jest is a complete and easy to set up JavaScript testing solution. In fact, Jest works out of the box for any React project.
-
QUnit is a powerful, easy-to-use JavaScript unit testing framework. It’s used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code, including itself!
-
A simple tool that allows you to execute JavaScript code in multiple real browsers.
Karma is not a testing framework, nor an assertion library. Karma just launches an HTTP server, and generates the test runner HTML file you probably already know from your favourite testing framework.
Assertion library
-
Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework.
-
should is an expressive, readable, framework-agnostic assertion library. The main goals of this library are to be expressive and to be helpful. It keeps your test code clean, and your error messages helpful.
var should = require('should'); (5).should.be.exactly(5).and.be.a.Number();
-
Minimalistic BDD assertion toolkit based on should.js
var expect = require('expect.js'); expect(1).to.be(1)
Mocking library
-
Standalone test spies, stubs and mocks for JavaScript.
Works with any unit testing framework.
Test coverage
-
- All-javascript instrumentation library that tracks statement, branch, and function coverage.
- Module loader hooks to instrument code on the fly
- Command line tools to run node unit tests “with coverage turned on” and no cooperation whatsoever from the test runner
- Multiple report formats: HTML, LCOV, Cobertura and more.
- Ability to use as middleware when serving JS files that need to be tested on the browser.
- Can be used on the command line as well as a library
- Based on the awesome esprima parser and the equally awesome escodegen code generator
- Well-tested on node (prev, current and next versions) and the browser (instrumentation library only)
- All-javascript instrumentation library that tracks statement, branch, and function coverage.