DEV Community


Discussion on: 5 Reasons Why Front-end Is So Hard

noclat profile image
Nicolas Torres

I don't write tests for front-end on end projects. Usually a Storybook (or equivalent) is enough as you document all props with examples, so you know when it breaks and fix it. Front-end tests are much of a hassle for very volatile components.

javierriveros profile image
Javier Riveros

Agree with you, frontend testing always has been for me a pain

Thread Thread
jackmellis profile image

I always write tests. I find they're only a pain if you don't write testable code in the first place...

Thread Thread
jfbrennan profile image
Jordan Brennan Author

There’s certainly easy unit testing that can and should be done, UI component tests are relatively easy too, but there’s a lot of real world cases that are really really hard to mock (browser history, latency handling, failing API calls (i.e. the “error” in zero-1-2-1000-error) and unintentional visual regressions can be very tough catch, especially cross-browser and cross-device. All technically possible, but extremely difficult to maintain

Thread Thread
kalashin1 profile image
Kinanee Samson

I find projects built with angular quite easy to test.

Thread Thread
ortonomy profile image

but you have to hold your nose when using angular. The stink!