DancingNoodle
DancingNoodle

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?

29mo ago
Jobs
One interview, 1000+ job opportunities
Take a 10-min AI interview to qualify for numerous real jobs auto-matched to your profile 🔑
+322 new users this month
FluffyNugget
FluffyNugget
Plivo29mo

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