NG Mocks is pretty much dead now, what is spectator gonna do about that? #735
Martinspire
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been using Spectator together with NG Mocks for a while and it worked fine until a few major angular versions ago. Not all of the new signals are supported, which makes it difficult to get clean separated unit tests that use the latest features. And this is before Angular gets to gain the new signal forms as well.
I wonder what other folks have been using instead, because mocking isn't easy (so I totally get why that mocking library didn't get as much love lately) and if you don't mock, you need to provide a lot of separate mocks for services that are now trying to do certain real world API calls and various user interaction that can interfere with your test.
Right now Spectator relies and contains a lot of APIs from NG Mocks but I wonder how long those will be function, if at all. Especially for projects that need long term support, this is going to be key to keep valid unit tests in our projects. So this can all go 3 ways:
I really hope to keep using ng mocks or similar solutions for a long time, but right now the situation is quite dire. Especially with Signal Forms on the horizon and contemplating long term support for my current project, I hope that we can work something out to provide the necessary changes to NG Mocks and perhaps adopt it.
The current owner/maintainer of NG Mocks (Satantime) has already stated that the project is not a priority for him right now. He has moved on to a different library (something other than Angular) and while he doesn't mind accepting pull requests, he simply doesn't have the time to work on it anymore. He has made it clear he would love for somebody else to take over and keep the project alive. However nobody has come forward. And since its a very complex topic with large amounts of code, it will be difficult for anybody to maintain such a project. Let alone all the pittfalls and gotchas that the current library has to work around or the amount of legacy code that is still in there.
Personally I also wouldn't mind a new library that focusses on signals (with a bit of RXJS for API calls) but I just don't know if there is anybody here that would mind diving into that and work something out. Even if some parts of Angular are too difficult to work out right now, I would already be thrilled if I could implement 80% coverage of my code with a decent solution, as long as it doesn't break stuff or make tests impossible with the new signals.
I'm also eager to see what you guys are planning, now that it looks that ngmocks is kind of losing its support. Are you moving to a different solution and if so, what are you looking to go for?
Beta Was this translation helpful? Give feedback.
All reactions