Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 337
user428745 Avatar asked Aug 01 '17 19:08

user428745


1 Answers

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.

like image 97
alexmac Avatar answered Sep 28 '22 03:09

alexmac