-
Notifications
You must be signed in to change notification settings - Fork 309
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
Test failing with apollo graphql code generator #962
Comments
Did you run You must always run |
I also tried adding require('jest-preset-angular/ngcc-jest-processor'); in the jest config |
Maybe try with |
that seems to solve the issue on the demo repo I created. What is different that adding the require('jest-preset-angular/ngcc-jest-processor'); i which also seems to be running the ngcc command? |
|
for the example project I created it seemed to work. For the actual project it is still failing.
|
This error is also related to |
running ngcc --tsconfig "./tsconfig.spec.json" && npx jest fixes the problem. update: it eventually started failing again without being able to fix it. ngcc command seems not to be the solution. |
@ahnpnl kamilkisiela/apollo-angular#1703 |
Could be related to #963 if you try to import namespaces. |
This is definitely a duplicate of #963 |
🐛 Bug Report
I migrated jest and jest-preset-angular to the latest version (jest 27 and jest-preset-angular 9.0.4)
When I now run unit tests, it will fail on the generated gql not able to resolve all parameters.
for example
will now fail on
Error: Can't resolve all parameters for ExampleGQL: (?).
In previous version of jest-preset-angular and jest 26.x this all worked fine.
To Reproduce
setup testbed and add a generated GQL to the providers list
I created a repo where I simulated the situation (very light) but the error is the same
Expected behavior
I expect the test not to fail with Can't resolve all parameters for ExampleGql: (?) with "emitDecoratorMetadata": true
Just like on the old version of jest and jest-preset-angular
Link to repo (highly encouraged)
https://github.com/Nielsb85/jest-preset-angular
Error log:
● example › should not fail on missing deps
envinfo
The text was updated successfully, but these errors were encountered: