DEV Community

loading...

Discussion on: Unpopular opinions

Collapse
bendman profile image
Ben Duncan

Most testing of UI components is a waste of time, especially snapshot testing.

Frontend developers should run their code in a browser to see what they built. Any teams I've been on that used automated tests for UI components inevitably have developers who get overconfident in the tests and don't even check their code in a browser, breaking things.

For a test to be valuable it should either be written before the target code, written before fixing a bug, or written for either a project or team so large that people might break things in different parts of the codebase. I haven't seen many exceptions.