kabisa / kudos-frontend

The frontend for the Kudos-o-Matic! (Mobile / Desktop)
2 stars 0 forks source link

Fix/tests #176

Closed matthijsgroen closed 3 months ago

matthijsgroen commented 3 months ago

What

This is a continuation of #153 . A lot of tests where disabled (using .skip) this PR fixes some of them, improving the code coverage by 23%. (to a total of 42.0%)

For the tests that needed fixing, enzyme also has been replaced with RTL

Why

At Kabisa we pride ourselves on our Craftsmanship. The Kudo app is a typical 'Kabisa' App, build from and for us. I beleive we should hold it to our standards. So when I discovered almost all tests where disabled, I had to try to fix them.

Fixing the tests is actually not hard, they are easy to rewrite using React Testing Library. It just takes a lot of time.

Since we cannot spend all the time required to fix all the tests, a timeboxed approach has been settled on.

So see this as the first batch of fixes. Hopefully others (or future self) will fix the remainder of them.

Code Review

Please consider the following checklist when reviewing this Pull Request.
More background and details here.

codeclimate[bot] commented 3 months ago

Code Climate has analyzed commit f47c9bd8 and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 5

The test coverage on the diff in this pull request is 79.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 42.0% (23.0% change).

View more on Code Climate.