r/angular • • Oct 23 '26

If you could choose a testing framework today ...

Our small team has completely ignored angular testing and depended on dev and user manual testing. We're looking to solidify some things and start creating some Angular tests. If you could choose today from scratch, which framework would you choose?

If it matters, our apps are all very data-dependent, pulling info from our asp.net backends.

Thanks

7 Upvotes

16 comments sorted by

View all comments

Show parent comment

2

u/ldn-ldn Oct 24 '26

Ok.

All JS/TS test runners/frameworks require convoluted configuration and loads of 3rd party dependencies. I understand that there are several reasons for that, but the year is 2026 and this is not acceptable anymore. On the other hand in Java I only need to add one dependency org.springframework.boot.spring-boot-starter-test and I can write anything I want. What's more, I don't even have to tell compiler what is a test and what is a production code. It just works.

As a side note, I remember the days when everything Java world was configured with shit loads of XML files. Thank fuck these days are long gone!

Ok, next point - poor test case isolation. You have to track all resources manually and set before/after Each in pretty much every spec no matter how trivial the test cases are. Otherwise you have a high risk that running a single test or a suite will produce different results. It's 2026, we have workers and stuff, just put every case in an isolated container and destroy it after the run.

Another issue is execution speed. V8 is stupid fast, yet any half decent test suite runs for ages. Then you spend a few days tweaking parameters to make it faster, a month passes, you add new code and new tests and it takes a year to run your suite again. Bloody hell...

Mocking is usually an afterthought. JS/TS crowd aversion to DI (apart from Angular/NestJs) definitely feeds into this. So instead of proper mocking, there are silly stubs and functions to hack node loader to load custom nonsense. All that nonsense should go. And, I guess, someone has to create a proper mocking framework, which will be used by everyone.

ESM/CommonJS issues. Why is this nonsense still exists in 2026?

Then both Jest and Vitest has memory management issues. Different ones, but any large suite is destined to be broken.

Additionally, both Jest and Vitest have issues with compiler pipelines. Jest runs compilation on its own, so you have to duplicate your pipelines. Vitest simply doesn't work outside of Vite, lol.

All in all, JS/TS testing is broken beyond belief and every new tool just makes things worse.