-
Notifications
You must be signed in to change notification settings - Fork 72
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
Need to inject config:environment
into all unit tests that touch Apollo
#55
Labels
Comments
One alternative would be to instruct folks to use Either way, falling back to default options in tests seems like an ergonomic win 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow-up from #53.
It's a bit annoying to have to use a
needs: ['config:environment']
in addition to already needing aservice:apollo
in any unit test that touches Apollo. As of now, this blows up on theconfig.apollo
call when not using that injection becauseconfig
is undefined here.One way I'm working around this in my own tests is with this hack:
I'm not sure if there's a better way to handle this. At the very least, I think there should be a descriptive error like this when a required config isn't set up or available.
The text was updated successfully, but these errors were encountered: