-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Unit test endpoints and backend functions for code stability, catching regression bugs
User Stories
As a developer, I want a comprehensive suite of unit tests for the methods in my API
So that as I can continue to develop I can be confident that my changes are not introducing bugs into other areas of the codebase
As a developer, I want to use a combination of mocha, sinon, chai and proxyquire to write my tests,
so that I can easily write and run an automated suite of tests that effectively checks the functionality of the code without needing to run in a production environment
Acceptance Criteria
Given that I have cloned the repo to my local machine
When I inspect the repo
I should see a directory /test/ populated with .spec.js files
and,
Given that I have already run npm install successfully
When I run npm run test
I should see a record of tests run covering the following cases for each endpoint
- Successful request
- Missing data
- Malformed data
- Server side failure