Mocha is an extensible, open-source JavaScript testing framework that runs in Node.js or the browser. It supports both TDD and BDD by allowing you to use any assertion library, such as expect.js, should.js, and Chai.

Mocha supports spies, stubs and mocks through libraries, such as Sinon.

Mocha supports testing both synchronous and asynchronous code, including promises.