Amy Blankenship
1 min readNov 23, 2023

--

The way that full stack frameworks like Remix and NextJs force you into e2e testing is one of the things I don't like about them. I'd still work to architect your code where you can isolate as much code as you can--if you can test a React component in isolation you don't have to waste time with the whole spin it up, navigate, click-click-click, spin it down, try to figure out exactly what in all that went wrong. Cypress also allows you to call your backend endpoints in isolation as well.

As I was explaining to my boss this week, if you have 3 features that each do one thing that impacts each of the other features, testing that is now means you have to test 3^3 code paths. Then, if each of those things now has 3 settings that all impact each other, that's 3^3^3, which is a hair less than 20,000. You can literally never test all your full code paths, but you can test that smaller pieces, given the right inputs, produce the right outputs.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

Responses (1)