-
-
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
False positive ng-mocks not in JIT. #1427
Comments
Hi @qdelettre Thanks for the info. I'm on vacation, I'll be back in 1 week and take a look at the issue. |
Same here. Using it with NX, angular 13.0.3, ng-mocks 12.5.0. |
Having problems upgrading it to 13.0.3 with ng-mocks 12.5.0 as well. Managed to get 13.0.2 working after a while. |
I think one of the problems is here:
|
I've also encountered the issue in a library I'm maintaining. I have a Reading the stacktrace suggests that ng-mocks is trying to use Loving the project so far, I hope that a solution can be found to fix this. Stacktrace:
|
Hi all, I'm back and going to check and fix the issue during this week. |
For me the problem was solved by downgrading to 13.0.2. Thank you for your support. |
This is not a solution but a temporary workaround. |
I'm having same issue. |
Thanks a lot! Shipping a fix for this asap would be greatly appreciated! |
Hi folks, I'm working on the fix, but due to core changes in A13 it still requires time to properly fix it in the way that it would support A5+ versions. Btw, are there devs which don't install |
Thanks @satanTime for the fix. Can't we update the docs that which ng-mock version support which version of angular. |
Can you not release a new major version and drop support for old Angular versions? |
Would it make sense to follow angular LTS ? with 10 ending on dec 24rth . https://angular.io/guide/releases#support-policy-and-schedule is there a release or branch we can use in the meantime for those of us on ng13 ? |
Yes, this is what I'm checking currently. The issue is that it's not purely Anyway the solution will be found. Either with support of all A version or just A13. |
Is there a rough time frame for when this would be fixed? |
Hi, the estimate is asap. The next weekend, I should finish that and to switch to investigation and implementation of a fix. It may take 2 more weekends, and considering the holiday, I would expect a properly working fix around mid January. Currently, I would recommend to stay on Angular 13.0.2 and ng-mocks 12.5.0. Unfortunately, this task isn't something where it's easy to help. If anyone has time, it would be great to fix the PR with the update to the latest jest before the upcoming weekend. |
@satanTime Hi. |
To release an alpha candidate, I still need to bring the repo to the latest dependencies, to ensure that the candidate will work with all of them, because otherwise - Angular 13 is supported, but the latest jest version is failing, and it will be the same story. Might you describe, why you have to stay with Also for all people who want to help with the project - feel free to take any good first issue, it will help the project a lot too. Thank you all in advance. |
I just downgraded an angular 13.1.2 project to 13.0.2 and the same error still occurs! |
That sounds weird. For us it definitely did the trick. Please make sure that in your .lock file |
even though I listed the correct version in package, package lock was up a few versions. I removed node_modules and reinstalled from scratch to get it right from memory. downgrade can be fiddly. |
confirmed |
actually I first uninstalled @angular/cli globally and re-installed as follows: npm i @angular/cli@13.0.2. |
@satanTime pipes seems to be fixed :) Regarding the ID, it's the same components as before again. I'm guessing it's the hostbinding in them that's causing it.
If I disable that HostBinding the test succeeds. In the html it added this to t he mocked component: id="undefined" |
Hi @SnakeSVx, Yes. I've added host bindings and host listeners. Now I need to think whether we need them in mocked declarations. And, knowing that nobody has complained about them for years - looks like it was a mistake :) |
FYI: It seems we were also affected by the problem with mocking pipes, now with alpha.5 it's fixed. Thanks a lot for your work! |
You're a life saver @satanTime. Thanks for you great work. |
fix(core): ignoring host bindings in mocks #1427
v13.0.0-alpha.6 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. |
All green now, thanks a lot ! |
Same, all green for us now as well. Thank you for all the help and providing us with this great library :) |
Awesome! Thank you all for help and feedback. Stay in touch 🤙🏼 |
Hello @satanTime,
Best Regards |
Hi @cdupetit, Could you try .6? |
This version fix the warning. |
.6 is working for us with Angular 13 and Kendo UI |
v13.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. |
Everything is working fine now !! :) Thanks !!!! |
I just set this up on our unit tests and things are working great. Thank you so much for your hard work! |
Hi !
FYI i just tried to upgrade my toy app to angular v13.0.3, and it seems something is breaking ng-mock (it was working previously in v13.0.2)
Related PR
Actions Job log
The text was updated successfully, but these errors were encountered: