Re:Show HN: I transformed my library into a Node and 100% co...
by dmoy on Monday March 07, 2016 @12:07PM
(#11239964)
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.
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.