mochajs/mocha
github:https://github.com/mochajs/mocha
Star: 10427
Fork: 1559
Watch: 344
Up to 2016.09.21
simple, flexible, fun
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.
Features
| Left | Right |
|---|---|
| browser support | global variable leak detection |
| simple async support, including promises | optionally run tests that match a regexp |
| test coverage reporting | auto-exit to prevent “hanging” with an active loop |
| string diff support | easily meta-generate suites & test-cases |
| javascript API for running tests | mocha.opts file support |
| proper exit status for CI support etc | clickable suite titles to filter test execution |
| auto-detects and disables coloring for non-ttys | node debugger support |
| maps uncaught exceptions to the correct test case | detects multiple calls to done() |
| async test timeout support | use any assertion library you want |
| test retry support | extensible reporting, bundled with 9+ reporters |
| test-specific timeouts | extensible test DSLs or “interfaces” |
| growl notification support | before, after, before each, after each hooks |
| reports test durations | arbitrary transpiler support (coffee-script etc) |
| highlights slow tests | TextMate bundle |
| file watcher support | and more! |