-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Angular Component Testing: providing of transitive dependencies fails #24047
Comments
@rainerhahnekamp thanks for the detailed issue. This is a known issue with Angular CT, see the discussion on #23427. For the time being, you can work around this by doing something similar to what is mentioned in this comment. |
I totally agree with Rainer! I think that I mislead us with this issue jordanpowell88/angular-ct#37 We actually need both: providers and componentProviders This will be a breaking change so it might be better to do it while we're in the early stage. What do you think? |
The code for this is done in cypress-io/cypress#24394, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
If I use a service in a component that has a dependency to
HttpClient
and I provide theHttpClient
, the mounting fails.The error message is
If the component under test depends directly on the
HttpClient
and I provide theHttpClient
, the mounting works.Desired behavior
Providing of transitive dependencies should work.
Test code to reproduce
https://github.com/rainerhahnekamp/cypress-component-angular
Cypress Version
10.9.0
Node version
16.15.0
Operating System
Windows 11 Professional
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: