DEV Community

Discussion on: Does your team write code tests for front-end code?

Collapse
 
nickytonline profile image
Nick Taylor • Edited

We don't strive for 100% code coverage, but we do have unit tests for all things redux and any other code that is not actual UI.

For UI, we use Storybook to build/test components in isolation (we're a React/TypeScript shop). I consider Storybook to be part of tests as well, even if only visual.

Aside from that, where relevant, snapshot testing. I haven't had time, but Storybook has Storyshots which allows you to incorporate snapshot testing right in Storybook.

When I worked at McAfee on the True Key password manager, E2E testing was crucial as we had to ensure the browser extension worked correctly.

At the moment, where I'm at, we do not have any end to end testing in place. It's something I'm pushing for. I've been looking into Cypress. That's one of the things I'd like to get in place this year.