MochaJS is javascript testing framework from Node, In this document I explain how to install and use MochaJS for testing API
Supertest is module that provide the high-level API for testing HTTP
ChaiJS is an assertation library for node and browser. it make test and validation eassier because it can be pair with others javascipt framework and has readable style language.
npm install mocha -g --save-dev
more information: http://mochajs.org/#installation
npm install supertest --save-dev
more information: https://www.npmjs.com/package/supertest
npm install chai
more information: http://chaijs.com/guide/installation/#nodejs
- Clone source from github
- Adjust request url (depend on server)
- run test on terminal
npm test
- If you want to try another scripts, please run script using
mocha