-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Cache break of MockComponent #96
Comments
Hi @ike18t, I hope you are fine. I was thinking about df56334 and, being honest, can't find a way how to reimplement it with the correct cache support. Because MockComponent(MyComponent, {template: 'a'}); and MockComponent(MyComponent, {template: 'b'}); and MockComponent(MyComponent); simply don't work all together. We can implement Please let me know your decision and I'll prepare either pure revert or revert + createMock... functions. |
Hi @askarby, might you provide an example how you use it? Unfortunately, otherwise I need to deprecate it and remove in v11. |
Unfortunately, there's an issue with cached component because cache doesn't respect 2nd argument of MockComponent and we have the same problem as MockPipe has when we pass there different transformers.
df56334
A possible solution is to redo this feature in a proper way.
.mock
method Allow mocking an internal vs external module #44.TestBed.overrideComponent
on the cached mock can help there.@askarby, could you provide a test sample how you use it in your project?
The text was updated successfully, but these errors were encountered: