sublinks / sublinks-frontend

MIT License
17 stars 5 forks source link

Unit tests for components #108

Closed kgilles closed 6 months ago

kgilles commented 7 months ago

We have added a unit test configuration using Jest. Now it's time to expand our coverage.

This ticket is to write unit tests for all* our stateful React components. Ie. all components which in some way manages a state and/or performs actions on user interactions.

* We have a lot of components already. Feel free to only write tests for 1/3 or 1/2, and create a follow-up ticket to continue the work.

kgilles commented 6 months ago

While looking over our components I believe it's not necessary to unit test all/any components. The ones who're using business logic should have that logic living and tested separately from the component. As a util or hook. The actual component behavior and flow will be tested when we create the E2E tests.

Canceling this ticket.