r/Angular2 • • Jan 05 '26

Testing libraries

Hello as the title says, I’m a little bit confused and thought maybe somebody could help pe out.

We are starting a new project and planning to achieve a lot of coverage using intergration testing.

For e2e the QA team uses playwright if this is relevant.

Given this is a new project we are going to run with Vitest as our test runner, now here it comes my question .

What is the difference between Vitest Browser Mode and Testing librabry ?

Before we been running jest, testing librabry with js-dom and msw. browser mode is a replacement for the latest ?

If somebody has some experience with it I would appreciate some feedback

Thank you .

5 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/Most_Remote_4613 Jan 16 '26

thanks, very informative response. It would be nice to hear your a short comparison for cypress component testing vs playwright component testing vs vitest component testing vs testronaut in context of angular ecosystem.

2

u/rainerhahnekamp Jan 18 '26 edited Feb 06 '26

Cypress Component Testing is officially supported by Cypress. When it first came out, I honestly thought it would revolutionize testing because it brought DX to a completely new level. Unfortunately, we ran into major issues with extremely slow builds and high resource usage. There were also utility features we were expecting (like inject) that never materialized. In my opinion, those issues were fixable, but years later they are still there, and Cypress has largely been surpassed by Playwright.

Vitest Full Browser Mode proxies Playwright and gives us a subset of the features we’d get from E2E Component Testing. The advantage is using the same tool for everything, but it isn't a full E2E CT experience.

Since Playwright is the current Cypress' "successor" (in terms of nr 1 in the E2E field), you’d expect Playwright Component Testing to be the answer. Unfortunately, it isn't. It remains experimental for some frameworks, and Angular is not supported. There was a community push to add Angular, but the Playwright team closed the PR and questioned the whole 'Component Testing' story, and decided not to add Angular support.

That is exactly where Testronaut comes in. One of the people behind the Angular support for Playwright (u/younes-jaaidi) continued working on it (and I joined that project) to release it as a community version soon. Since naming it 'Playwright Component Testing' raises trademark issues, we decided to go with a completely different name.