-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 [github] initialization #1861
Conversation
This creates a new convenience class which consolidates all the Github initialization. It supports dependency injection and facilitates refactoring the persistence along the lines of #1205.
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed, the implementation makes sense. 👍
Should we add a few tests to github-constellation.js, to check what's going on in the initialize
and stop
functions?
I’m not sure it makes sense to add any. All they could really do is mock all the method calls, and if we do that we still don’t know the code actually works. IMO it’s better to test at a lower level, with specs for persistence, the token logic, and maybe the acceptor routes, and at a higher level, to depend on the service tests making sure we can hit github. |
…onstellation # Conflicts: # lib/github-auth.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, let's get this merged then!
Thanks! |
This creates a new convenience class which consolidates all the Github initialization. It supports dependency injection and facilitates refactoring the persistence along the lines of #1205.
Also ref #1848