-
Notifications
You must be signed in to change notification settings - Fork 114
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
Testing Modules - Property 'resolvers' does not exist on type GraphQLModule<any, any, any> #300
Comments
Which version of |
@ardatan I downgraded from 0.3.0 to 0.2.18 and I can see the property now. However it still isn't switching out the implementation for the mock |
Same problem. The Also, in the example it seems like the In general, this doesn't seem like "injecting" a mock provider into the module. This is mentioned in the dependency injection section specifically referring to tests but remains unclear. |
Any updates? |
Any news on this? |
The bug is related to overwriting an existing provider by using; injector.provide({
provide: ExistingProvider,
overwrite: true,
useClass: MockProvider
}) I created a PR for this issue, and published an alpha release;
So, could you try testing your module again with this alpha version? |
Fixed in |
Following the example from the testing documentation and getting an error with the resolvers property not being available on my module. I tried using the selfResolvers property instead and i'm not sure if it's related but my provider isn't being swapped out for the new test one configured in my test module and so it's calling the actual implementation.
The text was updated successfully, but these errors were encountered: