Search code examples
node.jstddmocha.jssupertest

what is the difference between Mocha and Supertest?


I'm a NodeJs beginner. Anyway, I want to create an application starting by tests, like TDD approach.

What is the difference between Mocha and Supertest?


Solution

  • mocha is a test framework.

    Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun.

    supertest is a module for testing API.

    Provides a high-level abstraction for testing HTTP, while still allowing you to drop down to the lower-level API provided by superagent.