Search for a command to run...
JavaScript test framework that runs on Node.js and in the browser, emphasizing simplicity and flexibility. Asynchronous testing is handled natively with callbacks, promises, or async/await, while tests run serially for accurate reporting and clear mapping of uncaught exceptions to specific test cases.
One of the longest-running test frameworks in the JavaScript ecosystem. Used by projects like Express, Connect, and WebDriver.io. Mocha does not bundle assertions or mocking, instead letting teams pair it with their preferred libraries such as Chai or Sinon, unlike all-in-one frameworks like Jest that ship these features built-in.
Key capabilities:
Well suited for unit and integration testing of Node backends, API and service testing where async flows matter, and teams preferring a minimal core with composable assertion and mocking libraries. Integrates into CI with npm test and configurable reporters such as spec, dot, or JSON.