-
Notifications
You must be signed in to change notification settings - Fork 7
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
Decouple service from global state #186
Conversation
I think this is probably ready for a first pass review. |
thank you so much, the global config bothered me a lot but I didn't know if it was just conventional in node apps or so, or what the right fix was (I'm not a JS/TS developer by trade) |
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.
main changes seem nice and straightforward, albeit large.
Testing machinery seems a bit fiddly but overall fine.
This PR effectively refactor the service to stop depending on global state, which allows us to start testing the service in it's component pieces. Quite a lot of the codebase depended on the global config, which means we'd have to mock it every time in order to run tests. This PR fully separates out the code from the config which will allow us to start testing,
Review Guide
I'm afraid this is fairly wide ranging, so I'll try to explain my changes: