News for hackers. Stuff that matters.
Re:Testing React Apps in 2022 with Cypress: An In-Depth Guid... by latchkey on Saturday October 01, 2022 @11:40AM (#33047394)
Cypress is good if you need to emulate a user navigating through screens on a site.

React Testing Library is good if you want to unit test individual components.

They both have their uses.

Re:Testing React Apps in 2022 with Cypress: An In-Depth Guid... by jkettmann on Saturday October 01, 2022 @12:57PM (#33048041)
Fyi with Cypress v10 and the new component testing feature you can do a lot of things that you'd usually to with RTL
Re:Testing React Apps in 2022 with Cypress: An In-Depth Guid... by philipwhiuk on Saturday October 01, 2022 @10:48PM (#33052355)
Despite calling itself a unit test framework, RTL is actually component testing because it doesn't believe in shallow rendering.

It's a massive pain in the ass.

Re:Testing React Apps in 2022 with Cypress: An In-Depth Guid... by lmiller1990 on Saturday October 01, 2022 @06:36PM (#33050807)
I made some content showing how the new Cypress Component Testing can also handle things you might use RTL for [0]. You can evening use the TL finders (but I don’t in this series).

[0] https://youtube.com/playlist?list=PLC2LZCNWKL9bLQrMQKfTnpihg...

Re:Testing React Apps in 2022 with Cypress: An In-Depth Guid... by whynotminot on Saturday October 01, 2022 @02:49PM (#33048956)
It's classic journey testing vs unit testing, and you should definitely do both.