From 882fbe0bfcb6e6e69044c4035f199a4a6844d7ac Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Mon, 22 May 2023 22:23:30 -0400 Subject: [PATCH] Coverage note --- content/notes/good-tests/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/notes/good-tests/index.md b/content/notes/good-tests/index.md index 60ddd86..65b3aaa 100644 --- a/content/notes/good-tests/index.md +++ b/content/notes/good-tests/index.md @@ -30,6 +30,9 @@ _(Notes for a Viget article I'm putting together)_ * Coverage * We shoot for 100% in SimpleCov (So all the Ruby is tested) * Some consider this too high or too burdensome -- I don't + * If it's 100%, you instantly know if you have any untested code + * If it's, say, 94%, and you add 100 lines, six of those can be untested -- hope they're perfect! + * In other words, at less than 100% coverage, you don't know if your new feature is fully covered or not * Occasionally you have to ignore some code -- e.g. something that only runs in production * Flaky tests are bad * They eat up a lot of development time (esp. as build times increase)