Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write tests for routes: api, assets #319

Open
jaredatron opened this issue Sep 26, 2017 · 0 comments
Open

Write tests for routes: api, assets #319

jaredatron opened this issue Sep 26, 2017 · 0 comments
Assignees

Comments

@jaredatron
Copy link
Contributor

jaredatron commented Sep 26, 2017

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 in web-server/routes/api.test.js
  • web-server/routes/assets.js in web-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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants