Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

RTL exists and is probably faster than cypress.

is component testing from cypress really needed. the only "benefit" I see is using a single tool



It is to me, testing arbitrary tree of components in live browsers can be invaluable, espcially for things like a design system, where snapshot testing can actually be really valuable[0].

RTL is great, but jsdom and similar solutions have limitations, being able to run similar tests in live browsers is really validating, in many cases allows us to cut down on writing somewhat more brittle E2E tests

The biggest win with playwright its like writing vitest / jest tests, it uses a similar `expect` function (I believe its a modified version of Jest expect but that may have changed) and I like their Pages API

The only thing I haven't used Playwright for yet is API testing

[0]: as you get more than just a DOM tree snapshot, you get the styles too. Great for catching regressions




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: