Code Coverage Reports and Custom Configuration with Istanbul, Jest, and React
<p>A few months ago, I met the one and only Robert “Uncle Bob” Martin (“Clean Code,” “The Clean Coder,” “Clean Architecture,” etc ). One of many questions people had for him was, “What parts on my application need to be covered with unit tests?” His response was, “Well, only the ones you want to work.”</p>
<p>Great response, right?</p>
<p>The more I write code, the more I believe that the 100% (or close to it) line-coverage threshold is not crazy but mandatory. One of the best things about good coverage is coverage reports that are green across all files.</p>
<p>Seeing all green makes people happy, and they tend to keep it green<em> </em>(i.e<em>.</em>, adding new tests when they add new code). No one wants to be that guy that made a file red after it was green for a long time.</p>
<p><a href="https://betterprogramming.pub/code-coverage-reports-and-custom-configuration-with-istanbul-jest-and-react-34e44c968b7c"><strong>Read More</strong></a></p>