DancingNoodle
DancingNoodle
32mo

Unit testing for React pages

I read that unit testing is almost useless. One should write component test. So what should I do to pages? Should I write component test or not?

32mo ago
FluffyNugget
FluffyNugget
32mo

U write tests in Wells Fargo?

SwirlyBagel
SwirlyBagel

Our tech roles are heavily outdated.

SqueakyRaccoon
SqueakyRaccoon

It depends on your project, if the business logic, state and render components (composition of reusable components) are well segregated, then unit test will work.

Refer this: https://react-spectrum.adobe.com/architecture.html

If not, better to test the journeys of the user, you can start with a chrome extension that will record your user journey and create a test suite out of it to try out. Later can move to Cypress or selenium

Discover more
Curated from across