Coverage
100% line coverage
92% statement coverage
100% block coverage
11 SLOC
/Users/dylan/gulp-coverage/test.js
100% line coverage
92% statement coverage
100% block coverage
11 SLOC
Line | Hits | Statements | Source |
---|---|---|---|
1 | 1 | 100% | module.exports = function () { |
2 | 1 | 100% | var i, matcher, |
3 | 1 | 100% | retVal = 0; |
4 | |||
5 | // throw new Error('bugger'); | ||
6 | 11 | 100% | for (i = 0; i < 10; i++) { |
7 | 10 | 100% | matcher = Math.floor(Math.random()*10+0.5); |
8 | 10 | 100% | if (matcher === i) { |
9 | 1 | 100% | retVal += 1; |
10 | 1 | 100% | retVal += 1; |
11 | } else { | ||
12 | 9 | 71% | retVal = (retVal > 100 ? retVal + 1 : retVal + 2); |
13 | } | ||
14 | } | ||
15 | 1 | 100% | return retVal; |
16 | 1 | 100% | }; |