-
Notifications
You must be signed in to change notification settings - Fork 477
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
🐞 - Cannot set property ɵprov of function AbstractTuiDialogService(idService)
#1257
Comments
You don't need to import anything, it should work. That is very strange, notifications are unrelated to dialogs. Can you make a little repository with reproduction? |
Repo for reproduce - https://github.com/robingenz/taiga-ui-issue-1257 |
Thanks @splincode, was just about to write it. 😄 @waterplea Thank you for your fast response. Please let me know if you need more information. |
Ops, sorry, missed the link somehow ) |
Also have this error. Thought that it was a problem with ng-mocks. But now believe it's not. |
My biggest problem at the moment is that I can't use TuiNotificationsService at all, otherwise even my previous tests won't run anymore, since the TypeError is thrown immediately as soon as any other test has a reference to TuiNotificationsService. |
Could it be something like this where compiler tries to compile service multiple times for some reason? |
Unfortunately, neither |
@waterplea Thank you for your time.
I don't think so. The production build works fine and enabling/disabling optimizations does not bring any change. I have tried both: Added |
Looks like this version of taiga:
isn't compatible with jest on angular 13 well (perhaps wrong ivy build / config). I've fixed your issue by running |
I can confirm this. @satanTime Thank you very much for your help! |
All current versions of Taiga require ngcc, it's weird that tests don't do this automatically 🤔 |
as a guess, maybe the problem is in a way to check: if it triggers |
Giving it a |
Agree. Sounds like a talk for a runner and not a lib |
@robingenz Hello, try add |
Thank you all for your help.
I have already added this exact line to my actual project and it works very well. So this is a good workaournd. |
Same issue still occurs with Angular 13/14 Even when using the |
Same issue here :/ |
Meets same issue after update to Angular 13 & nx 13. For me resolved by adding |
Which @taiga-ui/* package(s) are the source of the bug?
core
Please provide a link to a minimal reproduction of the bug
https://github.com/robingenz/taiga-ui-issue-1257
Description
Hi, first of all thanks for this great library.
I have the following issue:
When I want to test a component or service that injects the
TuiNotificationsService
, I get the following error:For testing, I use Jest.
Is there anything in particular that needs to be imported for the tests or have I missed anything else?
Angular version
13.1.0
Taiga UI version
2.31.0
Which browsers have you used?
Which operating systems have you used?
The text was updated successfully, but these errors were encountered: