3 ms·
Or you remove that line and let your test build run. If it's being used, it should be tested, and then your test will complain.
by bhaak 6y ago
Or you remove that line and let your test build run.
If it's being used, it should be tested, and then your test will complain.
- npsimons 6y agoWhile I laud the idea of having tests that reach 100% coverage (only half being snarky here), I feel that this is a bad habit to get into, just mindlessly changing things and assuming your tools will catch it.
- henrikn 6y agoHi! Blog post author here. I agree that tests are super valuable for many things, but it isn't enough here – at least not with the way my team writes tests. (Our) tests wouldn't catch unused CSS classes or i18n keys. (Our) tests wouldn't catch an unused method that is unit-tested. The unit test would happily pass because the unused method is still around and does what it should… in a vacuum. Tests are great for catching live code that was incorrectly removed, but I'm not sure how they would help catch dead code that was incorrectly left in – but would love to hear more about it :)