-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Feature Request: Angular v14 "inject" support #4282
Comments
Hi @ssergdev, thanks for reporting the issue. Could you check that this build works are you expect? ng-mocks.zip |
Hello and thank you for replying so fast! Quick test fails, tomorrow will reproduce in a separate repo. |
Hi, thanks for checking. I added some improvements: ng-mocks.zip |
feat(MockBuilder): mocks root providers via inject function #4282
v14.4.0 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems. |
@satanTime This bug seems to happen again on ng-mocks 14.13.0 |
Describe the feature or problem you'd like to solve
MockBuilder is mocking the providers defined in the component constructor but ignoring the providers defined with "inject" method:
The way how I can mock MyService here is to define it as a context:
Background
The text was updated successfully, but these errors were encountered: