logoalt Hacker News

rgoulteryesterday at 12:29 PM0 repliesview on HN

> Unit tests at >95% coverage

Eh. I wouldn't focus on unit test coverage.

I think it's true that good, well tested code will have higher code coverage than crappy code.

But, above a certain point (which will vary from codebase to codebase), unit tests aren't meaningfully increasing confidence that the code is working.

I'd recommend focusing instead on the code being written in a pure 'functional core, imperative shell' to the extent that's possible. For that pure/functional part, 100% code coverage is attainable (& so not worth remarking on). For the impure parts, unit tests are probably using "mocks" just to get the code to compile anyway.