A set of tests for JSONPlaceholder with Mocha, Chai and SuperTest
JSONPlaceholder is a fake Online REST API for Testing and Prototyping
An example of RESTful API testing with a common set of JS tools.
JSONPlaceholder details are listed in Resources and Routes sections on https://jsonplaceholder.typicode.com
Generally, the toolset is a combination of the most common and proven tools in JavaScript world to test API.
Mocha - JavaScript test framework (https://mochajs.org)
SuperTest - is a high-level abstraction for testing HTTP (https://github.com/visionmedia/supertest)
Chai - JavaScript assertion library (http://www.chaijs.com)
-
Clone the repository
-
Change directory to the repository root
$ cd /wherever/the/repo/presto
-
Run NPM to install all necessary dependencies
$ npm i
or
$ npm install
To execute the tests run the following command: $ npm test