-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
We have a serious lack of http request specs for our web application. We need to ensure the route we've written work as expected.
Write tests for
web-server/routes/api.js
inweb-server/routes/api.test.js
web-server/routes/assets.js
inweb-server/routes/assets.test.js
Tips
- See the tests in
web-server/routes/goals.test.js
for a pattern guide. - If the routes your testing respond with HTML, we might need to find and install a new dependency to help us make assertions about html. Something like
chai-html
- If your route makes database or api calls we might need to use
sinon
to stub some methods to return some mock objects.