DEV Community


Discussion on: How does your team approach unit testing?

ddaly profile image
David Daly Author

Thanks for the reply, getting another point of view here is interesting.

I think having high coverage is important, but yea, 100% definitely seems unnecessary.

Sometimes even the project template you are using comes with hundreds of lines of code. In my opinion, all the "plumbing code" is rarely testable in a nice and quick way.

This is actually one of the scenarios I mentioned about having tests for the sake of getting coverage. Its good to see that its a common issue here as well.

To me, a mix of 80% unit tests and some end-to-end tests for testing the flow of the application is a good compromise. Maybe its something we can try to improve on, and move away from the 100% unit test policy.

it's not about the code coverage, the confidence you gain from your tests. :-)

Exactly, I guess that's the main point. Thanks for the input!