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

refactor and add more unit tests for api methods #31

Open
3 of 5 tasks
meltedspork opened this issue May 4, 2018 · 0 comments
Open
3 of 5 tasks

refactor and add more unit tests for api methods #31

meltedspork opened this issue May 4, 2018 · 0 comments

Comments

@meltedspork
Copy link
Contributor

meltedspork commented May 4, 2018

We want to add more comprehensive unit test with api methods.

Currently we have 5 routes

  • / (return listed routes)
  • /name (return name of app)
  • /version (return current version of app)
  • /categories (return static data)
  • /signs/12345 (this is fake static data)

Right now we have only one sort of valuable test in generic test/test.js and currently only tests /version. We will want to reorganize the file names to making where it makes more sense.

Note: /categories and /signs/12345 require jwt auth. but we can use proxyquire https://github.com/thlorenz/proxyquire to stub auth process so we can bypass this for testing.

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

2 participants