Skip to content
Mark Wiemer edited this page Aug 30, 2025 · 106 revisions

Wiki migration notice

We're in the process of moving this wiki to mochajs.org. We'll keep pages up here for a while so links don't break, but please be on the lookout for updated links to pages within mochajs.org instead of pages here for documentation and examples. See issue #5248 for details.

We'll be replacing links to other pages in the wiki with links to the new site :)

HOWTO's, Tutorials

Add-ons

Warning: this section is very old (some links are from ~2015) and many of these repos are abandoned, niche, and maybe never functioned. Use at your own risk, they are not necessarily recommended by maintainers. We are preserving this list here while we curate a new one. See issue #5445 for details

Old recommendations

Assertion Libraries

  • unexpected - extensible BDD assertion toolkit recommended
  • chai - expect(), assert() and should style assertions recommended
  • expect.js - expect() style assertions recommended
  • expectations - Jasmine-style expect()
  • unit.js - simple, fluent assertions
  • inspect.js - modern BDD style assertion library
  • earl - ergonomic, modern and type-safe assertion library for TypeScript

Mocks, Stubs, & Spies

  • sinon.js - Test spies, stubs and mocks for JavaScript.
  • simple-mock - Super simple mocks, stubs, and spies with 1-step sandbox restore.
  • nock - HTTP mocking and expectations library.

Plugins

Interfaces & Reporters

  • mocha-suit - OOP like mocha wrapper
  • mocha-clean - Cleaner stack traces
  • mocha.parallel - Run async mocha specs in parallel.
  • lcov-reporter -- lcov reporter
  • xunit-file - A Mocha reporter similar to xunit, but writes to a file (excludes all console.log output that breaks the xml).
  • WebConsole-reporter - A Mocha reporter that displays reports in browser console. Works faster than html reporter and provides clickable stack traces.
  • mocha-unfunk-reporter - An alternate to the default Spec-style reporter for improved usability and added compatibility features for use in various low-tech scenarios. Does not use console cursor tricks or positional ANSI codes.
  • mocha-teamcity-reporter - Teamcity reporter for Mocha.
  • mocha-selenium-bridge - Run tests in the browser, report results via Node
  • loca - Reporter in your browser's console.
  • report-viewer - Cli for piping a unit test result directly into your browser. Combines the debug level of the console with the pretty output of a browser ui.
  • @testdeck/mocha - TypeScript OOP, decorators based, mocha test interface.
  • mochawesome - Produces a gorgeous standalone HTML/CSS report.
  • mocha-progress-reporter - Custom Mocha reporter with spinners and progress reporting ability.

Headless testing

Test coverage

Frameworks

Mocha Examples

Express | Connect

SuperAgent | WebSocket.io | Mocha

js-testing-boilerplates

Clone this wiki locally