Solid API built with Express with fully functional CRUD operations via a Postgres database.
Concrete examples of using Mocha and Chai to unit test JavaScript APIs and applications.
A NodeJS installation of v16^ required. Post man strongly recommended
$ git clone https://github.com/ericmoore123/mocha-testing-js.git
$ npm i
Verify dependencies after install.
API code and utilities are held under root directory and /utils respectively.
$ npm run dev
Server port declared as value held within a .env file but explicitly defined as port:8800 (fallback) by default.
Tests are held within the /test directory as per mocha documentation.
Test commands
$ npm test