If you're new here, you may want to subscribe to my RSS feed.
[fb-optin-form uid='' nofollow=false style='main' titletext='You can also get the feed via email. Sign up now by supplying your email address and clicking the Subscribe button' nonloggedonly=false]
You see, the more I practice Test Driven Development, the more inclined I am to believe that there are only three reasons for arguing against 100% code coverage.
The story goes that there were two men, Joe and Frank, who were camping out in the woods when a bear showed up in the camp. Terrified, they decided the best they could do would be to stay perfectly still until the bear left. Hopefully, the bear wouldn’t notice them. As the bear was poking around, Joe says to Frank, “What are we going to do if this doesn’t work?” Frank says, “Run!” Joe says, “You really think we can out run a bear?” Frank says, “I don’t need to out run the bear. I only need to out run you.”
As I’ve mentioned before, I’m in the middle of putting together a React reference app and I’m doing it using Test Driven Development. The problem is, the standard tools for implementing ES2015 code coverage with Jest make it hard to see at a glance if you have 100% code coverage or not because of some issues with the way Jest tells Babel to do the transformations by default, the way Babel transforms the code and implements the auxiliaryCommentBefore option and the way that Istanbul parses the ignore next comments.
I’ve been working on solving this problem for the last month and a half off and on. I’ve even posted a question about this on Stack Overflow, so I’m pretty sure no one else has a solution for this yet. I’m not going to say my solution is the best way to solve this problem, but it is a solution, which is better than what we have so far.
I loved teaching this particular group because they were actively engaged in the material. So many times, when I teach, the students simply absorb what I say, but they don’t interact with it. They never ask the question, “What are the implications of what is being said.”