Hacker News new | ask | show | jobs
by dmoy 3763 days ago
Say you have the following code:

if (foo) { setSomeState() }

At least with tools I'm familiar with, your coverage will be 100% if you have one test with 'foo = true'.

That means that you could have odd untested behavior if not executing 'setSomeState()' leaves something important unset.... but you'd have 100% coverage.

Of course in practice, 100% state coverage is really impossible to achieve.