-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Bug: MockBuilder.mock component that extends a service results in mock that's placed in providers rather than declarations #2646
Comments
Hi. Thanks for reporting the issue. I'll try to fix it today. |
is it only Service -> Component in your projects, or you have other combinations? |
Hi @DmitryEfimenko, could you check whether the fix works well on your project? |
The issue with the component that extends a service is fixed. Thanks! However, I still am experiencing an issue where I have to explicitly import ReactiveFormsModule. |
fix(MockBuilder): respect extention of classes with different decorators #2646
I see. Good. I've reopened that one. Please try to find a way how I could reproduce it on my side. |
v14.0.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. |
Description of the bug
Let's say we have a component that extends a service. Trying to call
MockBuilder.mock(MyComponent).build()
on that component results in the component mocked as a service and placed in the providers. Please see the repro link.I suspect that similar behavior would be observed if we call
.keep(...)
A repo with an example of the bug
Link: https://codesandbox.io/s/cool-swartz-f4nnwz?file=/src/test.spec.ts
Expected vs actual behavior
The mocked component should end up in
declarations
The text was updated successfully, but these errors were encountered: