Cellarise/istanbul-reporter-clover-limits

View on GitHub
Test_Resources/code-coverage/non-bundled/lib/clover-limits.js.html

Summary

Maintainability
Test Coverage
<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for lib\clover-limits.js</title>
    <meta charset="utf-8">

    <link rel="stylesheet" href="../prettify.css">

    <style>
        body, html {
            margin:0; padding: 0;
        }
        body {
            font-family: Helvetica Neue, Helvetica,Arial;
            font-size: 10pt;
        }
        div.header, div.footer {
            background: #eee;
            padding: 1em;
        }
        div.header {
            z-index: 100;
            position: fixed;
            top: 0;
            border-bottom: 1px solid #666;
            width: 100%;
        }
        div.footer {
            border-top: 1px solid #666;
        }
        div.body {
            margin-top: 10em;
        }
        div.meta {
            font-size: 90%;
            text-align: center;
        }
        h1, h2, h3 {
            font-weight: normal;
        }
        h1 {
            font-size: 12pt;
        }
        h2 {
            font-size: 10pt;
        }
        pre {
            font-family: Consolas, Menlo, Monaco, monospace;
            margin: 0;
            padding: 0;
            line-height: 14px;
            font-size: 14px;
            -moz-tab-size: 2;
            -o-tab-size:  2;
            tab-size: 2;
        }

        div.path { font-size: 110%; }
        div.path a:link, div.path a:visited { color: #000; }
        table.coverage { border-collapse: collapse; margin:0; padding: 0 }

        table.coverage td {
            margin: 0;
            padding: 0;
            color: #111;
            vertical-align: top;
        }
        table.coverage td.line-count {
            width: 50px;
            text-align: right;
            padding-right: 5px;
        }
        table.coverage td.line-coverage {
            color: #777 !important;
            text-align: right;
            border-left: 1px solid #666;
            border-right: 1px solid #666;
        }

        table.coverage td.text {
        }

        table.coverage td span.cline-any {
            display: inline-block;
            padding: 0 5px;
            width: 40px;
        }
        table.coverage td span.cline-neutral {
            background: #eee;
        }
        table.coverage td span.cline-yes {
            background: #b5d592;
            color: #999;
        }
        table.coverage td span.cline-no {
            background: #fc8c84;
        }

        .cstat-yes { color: #111; }
        .cstat-no { background: #fc8c84; color: #111; }
        .fstat-no { background: #ffc520; color: #111 !important; }
        .cbranch-no { background:  yellow !important; color: #111; }

        .cstat-skip { background: #ddd; color: #111; }
        .fstat-skip { background: #ddd; color: #111 !important; }
        .cbranch-skip { background: #ddd !important; color: #111; }

        .missing-if-branch {
            display: inline-block;
            margin-right: 10px;
            position: relative;
            padding: 0 4px;
            background: black;
            color: yellow;
        }

        .skip-if-branch {
            display: none;
            margin-right: 10px;
            position: relative;
            padding: 0 4px;
            background: #ccc;
            color: white;
        }

        .missing-if-branch .typ, .skip-if-branch .typ {
            color: inherit !important;
        }

        .entity, .metric { font-weight: bold; }
        .metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
        .metric small { font-size: 80%; font-weight: normal; color: #666; }

        div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
        div.coverage-summary td, div.coverage-summary table  th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
        div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
        div.coverage-summary th.file { border-right: none !important; }
        div.coverage-summary th.pic { border-left: none !important; text-align: right; }
        div.coverage-summary th.pct { border-right: none !important; }
        div.coverage-summary th.abs { border-left: none !important; text-align: right; }
        div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
        div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
        div.coverage-summary td.file { text-align: right; border-left: 1px solid #666; white-space: nowrap;  }
        div.coverage-summary td.pic { min-width: 120px !important;  }
        div.coverage-summary a:link { text-decoration: none; color: #000; }
        div.coverage-summary a:visited { text-decoration: none; color: #333; }
        div.coverage-summary a:hover { text-decoration: underline; }
        div.coverage-summary tfoot td { border-top: 1px solid #666; }

        div.coverage-summary .yui3-datatable-sort-indicator, div.coverage-summary .dummy-sort-indicator {
            height: 10px;
            width: 7px;
            display: inline-block;
            margin-left: 0.5em;
        }
        div.coverage-summary .yui3-datatable-sort-indicator {
            background: url("https://yui-s.yahooapis.com/3.6.0/build/datatable-sort/assets/skins/sam/sort-arrow-sprite.png") no-repeat scroll 0 0 transparent;
        }
        div.coverage-summary .yui3-datatable-sorted .yui3-datatable-sort-indicator {
            background-position: 0 -20px;
        }
        div.coverage-summary .yui3-datatable-sorted-desc .yui3-datatable-sort-indicator {
            background-position: 0 -10px;
        }

        .high { background: #b5d592 !important; }
        .medium { background: #ffe87c !important; }
        .low { background: #fc8c84 !important; }

        span.cover-fill, span.cover-empty {
            display:inline-block;
            border:1px solid #444;
            background: white;
            height: 12px;
        }
        span.cover-fill {
            background: #ccc;
            border-right: 1px solid #444;
        }
        span.cover-empty {
            background: white;
            border-left: none;
        }
        span.cover-full {
            border-right: none !important;
        }
        pre.prettyprint {
            border: none !important;
            padding: 0 !important;
            margin: 0 !important;
        }
        .com { color: #999 !important; }
        .ignore-none { color: #999; font-weight: normal; }

    </style>
</head>
<body>
<div class="header low">
    <h1>Code coverage report for <span class="entity">lib\clover-limits.js</span></h1>
    <h2>
        
        Statements: <span class="metric">24.78% <small>(28 / 113)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        
        
        Branches: <span class="metric">25.71% <small>(9 / 35)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        
        
        Functions: <span class="metric">4% <small>(1 / 25)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        
        
        Lines: <span class="metric">24.78% <small>(28 / 113)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        
        Ignored: <span class="metric"><span class="ignore-none">none</span></span> &nbsp;&nbsp;&nbsp;&nbsp;
    </h2>
    <div class="path"><a href="../index.html">All files</a> &#187; <a href="index.html">lib\</a> &#187; clover-limits.js</div>
</div>
<div class="body">
<pre><table class="coverage">
<tr><td class="line-count">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339</td><td class="line-coverage"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/* jslint node: true */
"use strict";
var path = require('path');
var Report = require('istanbul').Report;
var FileWriter = require('./util/file-writer');
var TreeSummarizer = require('istanbul').TreeSummarizer;
var utils = require('istanbul').utils;
var sloc = require('sloc');
var fs = require('fs');
var defaults = require('./defaults');
&nbsp;
/**
 * {description}.
 * @module {name}
 * @extends istanbul.Report
 * @param {Object} opts optional
 * @param {String} [opts.dir] the directory in which to the clover report will be written
 * @param {String} [opts.file] the file name for the coverage report, defaulted to config attribute or 'clover.xml'
 * @param {String} [opts.testDir] the directory in which to the summary coverage test report will be written
 * @param {String} [opts.testFile] the file name for the summary coverage test report, defaulted to config attribute or 'clover-tests.json'
 * @param {Object} [opts.watermarks] watermarks for the coverage report and summary coverage test report.
 * Only the lower limit is used by the summary coverage test report.
 * Example watermark object:
 * {~lb}
        statements: [ 50, 80 ],
        lines: [ 50, 80 ],
        functions: [ 50, 80],
        branches: [ 50, 80 ]
 * {~rb}
 */
function CloverJSONReport(opts) {
    Report.call(this);
    opts = opts || <span class="branch-1 cbranch-no" title="branch not covered" >{};</span>
    this.projectRoot = process.cwd();
    this.dir = opts.dir || <span class="branch-1 cbranch-no" title="branch not covered" >this.projectRoot;</span>
    this.file = opts.file || 'clover.xml';
    this.testDir = opts.testDir || opts.dir;
    this.testFile = opts.testFile || 'clover-tests.json';
    this.opts = opts;
    this.opts.watermarks = this.opts.watermarks || <span class="branch-1 cbranch-no" title="branch not covered" >defaults.watermarks();</span>
}
&nbsp;
CloverJSONReport.TYPE = 'clover-limits';
&nbsp;
<span class="fstat-no" title="function not covered" >function asJavaPackage(node) {</span>
<span class="cstat-no" title="statement not covered" >    return node.displayShortName().</span>
        replace(/\//g, '.').
        replace(/\\/g, '.').
        replace(/\.$/, '');
}
&nbsp;
<span class="fstat-no" title="function not covered" >function asClassName(node) {</span>
    /*jslint regexp: true */
<span class="cstat-no" title="statement not covered" >    return node.fullPath().replace(/.*[\\\/]/, '');</span>
}
&nbsp;
<span class="fstat-no" title="function not covered" >function quote(thing) {</span>
<span class="cstat-no" title="statement not covered" >    return '"' + thing + '"';</span>
}
&nbsp;
<span class="fstat-no" title="function not covered" >function attr(n, v) {</span>
<span class="cstat-no" title="statement not covered" >    return ' ' + n + '=' + quote(v) + ' ';</span>
}
&nbsp;
<span class="fstat-no" title="function not covered" >function branchCoverageByLine(fileCoverage) {</span>
<span class="cstat-no" title="statement not covered" >    var branchMap = fileCoverage.branchMap,</span>
        branches = fileCoverage.b,
        ret = {};
<span class="cstat-no" title="statement not covered" >    Object.keys(branchMap).forEach(<span class="fstat-no" title="function not covered" >function (k) {</span></span>
<span class="cstat-no" title="statement not covered" >        var line = branchMap[k].line,</span>
            branchData = branches[k];
<span class="cstat-no" title="statement not covered" >        ret[line] = ret[line] || [];</span>
<span class="cstat-no" title="statement not covered" >        ret[line].push.apply(ret[line], branchData);</span>
    });
<span class="cstat-no" title="statement not covered" >    Object.keys(ret).forEach(<span class="fstat-no" title="function not covered" >function (k) {</span></span>
<span class="cstat-no" title="statement not covered" >        var dataArray = ret[k],</span>
            covered = dataArray.filter(<span class="fstat-no" title="function not covered" >function (item) {</span>
<span class="cstat-no" title="statement not covered" >                return item &gt; 0;</span>
            }),
            coverage = covered.length / dataArray.length * 100;
<span class="cstat-no" title="statement not covered" >        ret[k] = { covered: covered.length, total: dataArray.length, coverage: coverage };</span>
    });
<span class="cstat-no" title="statement not covered" >    return ret;</span>
}
&nbsp;
<span class="fstat-no" title="function not covered" >function addClassStats(node, fileCoverage, writer, jsonResults, limits) {</span>
<span class="cstat-no" title="statement not covered" >    var metrics = node.metrics,</span>
        branchByLine = branchCoverageByLine(fileCoverage),
        fnMap,
        lines,
        linePercent = (metrics.lines.covered / metrics.lines.total).toFixed(2),
        branchesPercent = (metrics.branches.covered / metrics.branches.total).toFixed(2),
        functionsPercent = (metrics.functions.covered / metrics.functions.total).toFixed(2),
        result = {
            "title": "Coverage: " + asClassName(node),
            "fullTitle": "Coverage: " + node.fullPath(),/*"statement coverage: " + (linePercent * 100) +
             "% (statements covered = " + metrics.lines.covered +
             " total statements = " + metrics.lines.total + ")" +
             "\n" +
             "branch coverage: " + (branchesPercent * 100) +
             "% (branches covered = " + metrics.branches.covered +
             " total branches = " + metrics.branches.total + ")" +
             "\n" +
             "function coverage: " + (functionsPercent * 100) +
             "% (functions covered = " + metrics.functions.covered +
             " total functions = " + metrics.functions.total + ")",*/
            "duration": 0
        };
&nbsp;
<span class="cstat-no" title="statement not covered" >    writer.println('\t\t\t&lt;file' +</span>
        attr('name', asClassName(node)) +
        attr('path', node.fullPath()) +
        '&gt;');
&nbsp;
<span class="cstat-no" title="statement not covered" >    writer.println('\t\t\t\t&lt;metrics' +</span>
        attr('statements', metrics.lines.total) +
        attr('coveredstatements', metrics.lines.covered) +
        attr('conditionals', metrics.branches.total) +
        attr('coveredconditionals', metrics.branches.covered) +
        attr('methods', metrics.functions.total) +
        attr('coveredmethods', metrics.functions.covered) +
        '/&gt;');
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (linePercent &lt; limits.statements || branchesPercent &lt; limits.branches || functionsPercent &lt; limits.functions) {</span>
<span class="cstat-no" title="statement not covered" >        result.error = "";</span>
<span class="cstat-no" title="statement not covered" >        if (linePercent &lt; limits.statements) {</span>
<span class="cstat-no" title="statement not covered" >            result.error = result.error + "Insufficient statement coverage: actual=" + (linePercent * 100) +</span>
                "% required=" + (limits.statements * 100) +
                "% (statements covered = " + metrics.lines.covered +
                " total statements = " + metrics.lines.total + ")" +
                "\n";
        }
<span class="cstat-no" title="statement not covered" >        if (branchesPercent &lt; limits.branches) {</span>
<span class="cstat-no" title="statement not covered" >            result.error = result.error + "Insufficient branch coverage: actual=" + (branchesPercent * 100) +</span>
                "% required=" + (limits.branches * 100) +
                "% (branches covered = " + metrics.branches.covered +
                " total branches = " + metrics.branches.total + ")" +
                "\n";
        }
<span class="cstat-no" title="statement not covered" >        if (functionsPercent &lt; limits.functions) {</span>
<span class="cstat-no" title="statement not covered" >            result.error = result.error + "Insufficient function coverage: actual=" + (functionsPercent * 100) +</span>
                "% required=" + (limits.functions * 100) +
                "% (functions covered = " + metrics.functions.covered +
                " total functions = " + metrics.functions.total + ")";
        }
<span class="cstat-no" title="statement not covered" >        jsonResults.failures.push(result);</span>
    } else {
<span class="cstat-no" title="statement not covered" >        jsonResults.passes.push(result);</span>
    }
&nbsp;
<span class="cstat-no" title="statement not covered" >    fnMap = fileCoverage.fnMap;</span>
<span class="cstat-no" title="statement not covered" >    lines = fileCoverage.l;</span>
<span class="cstat-no" title="statement not covered" >    Object.keys(lines).forEach(<span class="fstat-no" title="function not covered" >function (k) {</span></span>
<span class="cstat-no" title="statement not covered" >        var str = '\t\t\t\t&lt;line' +</span>
                attr('num', k) +
                attr('count', lines[k]),
            branchDetail = branchByLine[k];
&nbsp;
<span class="cstat-no" title="statement not covered" >        if (!branchDetail) {</span>
<span class="cstat-no" title="statement not covered" >            str = str + ' type="stmt" ';</span>
        } else {
<span class="cstat-no" title="statement not covered" >            str = str + ' type="cond" ' +</span>
                attr('truecount', branchDetail.covered) +
                attr('falsecount', (branchDetail.total - branchDetail.covered));
        }
<span class="cstat-no" title="statement not covered" >        writer.println(str + '/&gt;');</span>
    });
&nbsp;
<span class="cstat-no" title="statement not covered" >    writer.println('\t\t\t&lt;/file&gt;');</span>
}
&nbsp;
<span class="fstat-no" title="function not covered" >function walk(node, collector, writer, level, projectRoot, jsonResults, limits) {</span>
<span class="cstat-no" title="statement not covered" >    var metrics,</span>
        slocStats,
        totalFiles = 0,
        totalPackages = 0,
        totalLines = 0,
        totalSourceLines = 0,
        tempLines = 0;
<span class="cstat-no" title="statement not covered" >    if (level === 0) {</span>
<span class="cstat-no" title="statement not covered" >        metrics = node.metrics;</span>
<span class="cstat-no" title="statement not covered" >        writer.println('&lt;?xml version="1.0" encoding="UTF-8"?&gt;');</span>
<span class="cstat-no" title="statement not covered" >        writer.println('&lt;coverage' +</span>
            attr('generated', Date.now()) +
            'clover="3.2.0"&gt;');
&nbsp;
<span class="cstat-no" title="statement not covered" >        writer.println('\t&lt;project' +</span>
            attr('timestamp', Date.now()) +
            attr('name', 'All Files') +
            '&gt;');
&nbsp;
<span class="cstat-no" title="statement not covered" >        node.children.filter(<span class="fstat-no" title="function not covered" >function (child) {</span></span>
<span class="cstat-no" title="statement not covered" >            return child.kind === 'dir';</span>
        }).
            forEach(<span class="fstat-no" title="function not covered" >function (child) {</span>
<span class="cstat-no" title="statement not covered" >                totalPackages += 1;</span>
<span class="cstat-no" title="statement not covered" >                child.children.filter(<span class="fstat-no" title="function not covered" >function (child) {</span></span>
<span class="cstat-no" title="statement not covered" >                    return child.kind !== 'dir';</span>
                }).
                    forEach(<span class="fstat-no" title="function not covered" >function (child) {</span>
<span class="cstat-no" title="statement not covered" >                        Object.keys(collector.fileCoverageFor(child.fullPath()).l).forEach(<span class="fstat-no" title="function not covered" >function (k) {</span></span>
<span class="cstat-no" title="statement not covered" >                            tempLines = k;</span>
                        });
<span class="cstat-no" title="statement not covered" >                        totalFiles += 1;</span>
                        //get sloc
<span class="cstat-no" title="statement not covered" >                        slocStats = sloc(fs.readFileSync(child.fullPath(), "utf8"), "js");</span>
<span class="cstat-no" title="statement not covered" >                        totalLines += slocStats.sloc + slocStats.cloc;</span>
<span class="cstat-no" title="statement not covered" >                        totalSourceLines += slocStats.sloc;</span>
                    });
            });
&nbsp;
<span class="cstat-no" title="statement not covered" >        jsonResults.stats = {</span>
            "suites": totalFiles,
            "tests": totalFiles,
            "passes": 0,
            "pending": 0,
            "failures": 0,
            "start": new global.Date(),
            "end": "",
            "duration": 100
        };
<span class="cstat-no" title="statement not covered" >        jsonResults.failures = [];</span>
<span class="cstat-no" title="statement not covered" >        jsonResults.passes = [];</span>
<span class="cstat-no" title="statement not covered" >        jsonResults.skipped = [];</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >        writer.println('\t\t&lt;metrics' +</span>
            attr('statements', metrics.lines.total) +
            attr('coveredstatements', metrics.lines.covered) +
            attr('conditionals', metrics.branches.total) +
            attr('coveredconditionals', metrics.branches.covered) +
            attr('methods', metrics.functions.total) +
            attr('coveredmethods', metrics.functions.covered) +
            attr('elements', metrics.lines.total + metrics.branches.total + metrics.functions.total) +
            attr('coveredelements', metrics.lines.covered + metrics.branches.covered + metrics.functions.covered) +
            attr('complexity', 0) +
            attr('packages', totalPackages) +
            attr('files', totalFiles) +
            attr('classes', totalFiles) +
            attr('loc', totalLines) +
            attr('ncloc', totalSourceLines) +
            '/&gt;');
    }
<span class="cstat-no" title="statement not covered" >    if (node.packageMetrics) {</span>
<span class="cstat-no" title="statement not covered" >        metrics = node.packageMetrics;</span>
<span class="cstat-no" title="statement not covered" >        writer.println('\t\t&lt;package' +</span>
            attr('name', asJavaPackage(node)) +
            '&gt;');
&nbsp;
<span class="cstat-no" title="statement not covered" >        writer.println('\t\t\t&lt;metrics' +</span>
            attr('statements', metrics.lines.total) +
            attr('coveredstatements', metrics.lines.covered) +
            attr('conditionals', metrics.branches.total) +
            attr('coveredconditionals', metrics.branches.covered) +
            attr('methods', metrics.functions.total) +
            attr('coveredmethods', metrics.functions.covered) +
            '/&gt;');
&nbsp;
<span class="cstat-no" title="statement not covered" >        node.children.filter(<span class="fstat-no" title="function not covered" >function (child) {</span></span>
<span class="cstat-no" title="statement not covered" >            return child.kind !== 'dir';</span>
        }).
            forEach(<span class="fstat-no" title="function not covered" >function (child) {</span>
<span class="cstat-no" title="statement not covered" >                addClassStats(child, collector.fileCoverageFor(child.fullPath()), writer, jsonResults, limits);</span>
            });
<span class="cstat-no" title="statement not covered" >        writer.println('\t\t&lt;/package&gt;');</span>
    }
<span class="cstat-no" title="statement not covered" >    node.children.filter(<span class="fstat-no" title="function not covered" >function (child) {</span></span>
<span class="cstat-no" title="statement not covered" >        return child.kind === 'dir';</span>
    }).
        forEach(<span class="fstat-no" title="function not covered" >function (child) {</span>
<span class="cstat-no" title="statement not covered" >            walk(child, collector, writer, level + 1, projectRoot, jsonResults, limits);</span>
        });
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (level === 0) {</span>
<span class="cstat-no" title="statement not covered" >        writer.println('\t&lt;/project&gt;');</span>
<span class="cstat-no" title="statement not covered" >        writer.println('&lt;/coverage&gt;');</span>
    }
}
&nbsp;
Report.mix(CloverJSONReport, {
    writeReport: <span class="fstat-no" title="function not covered" >function (collector, sync) {</span>
<span class="cstat-no" title="statement not covered" >        var summarizer = new TreeSummarizer(),</span>
            outputFile = path.join(this.dir, this.file),
            jsonOutputFile = path.join(this.testDir, this.testFile),
            writer = this.opts.writer || new FileWriter(sync),
            projectRoot = this.projectRoot,
            tree,
            root,
            jsonResults = {},
            watermarks = this.opts.watermarks,
            limits = {
                statements: watermarks.statements[0]/100,
                branches: watermarks.branches[0]/100,
                functions: watermarks.functions[0]/100
            };
&nbsp;
<span class="cstat-no" title="statement not covered" >        collector.files().forEach(<span class="fstat-no" title="function not covered" >function (key) {</span></span>
<span class="cstat-no" title="statement not covered" >            summarizer.addFileCoverageSummary(key, utils.summarizeFileCoverage(collector.fileCoverageFor(key)));</span>
        });
<span class="cstat-no" title="statement not covered" >        tree = summarizer.getTreeSummary();</span>
<span class="cstat-no" title="statement not covered" >        root = tree.root;</span>
<span class="cstat-no" title="statement not covered" >        writer.writeFile(outputFile, <span class="fstat-no" title="function not covered" >function (contentWriter) {</span></span>
<span class="cstat-no" title="statement not covered" >            walk(root, collector, contentWriter, 0, projectRoot, jsonResults, limits);</span>
<span class="cstat-no" title="statement not covered" >            writer.writeFile(jsonOutputFile, <span class="fstat-no" title="function not covered" >function (contentWriter) {</span></span>
                //set stats now we have them
<span class="cstat-no" title="statement not covered" >                jsonResults.stats.passes = jsonResults.passes.length;</span>
<span class="cstat-no" title="statement not covered" >                jsonResults.stats.failures = jsonResults.failures.length;</span>
<span class="cstat-no" title="statement not covered" >                jsonResults.stats.end = new global.Date();</span>
<span class="cstat-no" title="statement not covered" >                jsonResults.stats.duration = new global.Date() - jsonResults.stats.start;</span>
<span class="cstat-no" title="statement not covered" >                contentWriter.println(JSON.stringify(jsonResults, null, 2));</span>
            });
        });
    }
});
&nbsp;
module.exports = CloverJSONReport;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;</pre></td></tr>
</table></pre>

</div>
<div class="footer">
    <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Sep 01 2014 21:03:06 GMT+1000 (E. Australia Standard Time)</div>
</div>

<script src="../prettify.js"></script>

<script src="https://yui-s.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>
<script>

    YUI().use('datatable', function (Y) {

        var formatters = {
          pct: function (o) {
              o.className += o.record.get('classes')[o.column.key];
              try {
                  return o.value.toFixed(2) + '%';
              } catch (ex) { return o.value + '%'; }
          },
          html: function (o) {
              o.className += o.record.get('classes')[o.column.key];
              return o.record.get(o.column.key + '_html');
          }
        },
          defaultFormatter = function (o) {
              o.className += o.record.get('classes')[o.column.key];
              return o.value;
          };

        function getColumns(theadNode) {
            var colNodes = theadNode.all('tr th'),
                cols = [],
                col;
            colNodes.each(function (colNode) {
                col = {
                    key: colNode.getAttribute('data-col'),
                    label: colNode.get('innerHTML') || ' ',
                    sortable: !colNode.getAttribute('data-nosort'),
                    className: colNode.getAttribute('class'),
                    type: colNode.getAttribute('data-type'),
                    allowHTML: colNode.getAttribute('data-html') === 'true' || colNode.getAttribute('data-fmt') === 'html'
                };
                col.formatter = formatters[colNode.getAttribute('data-fmt')] || defaultFormatter;
                cols.push(col);
            });
            return cols;
        }

        function getRowData(trNode, cols) {
            var tdNodes = trNode.all('td'),
                    i,
                    row = { classes: {} },
                    node,
                    name;
            for (i = 0; i < cols.length; i += 1) {
                name = cols[i].key;
                node = tdNodes.item(i);
                row[name] = node.getAttribute('data-value') || node.get('innerHTML');
                row[name + '_html'] = node.get('innerHTML');
                row.classes[name] = node.getAttribute('class');
                //Y.log('Name: ' + name + '; Value: ' + row[name]);
                if (cols[i].type === 'number') { row[name] = row[name] * 1; }
            }
            //Y.log(row);
            return row;
        }

        function getData(tbodyNode, cols) {
            var data = [];
            tbodyNode.all('tr').each(function (trNode) {
                data.push(getRowData(trNode, cols));
            });
            return data;
        }

        function replaceTable(node) {
            if (!node) { return; }
            var cols = getColumns(node.one('thead')),
                data = getData(node.one('tbody'), cols),
                table,
                parent = node.get('parentNode');

            table = new Y.DataTable({
                columns: cols,
                data: data,
                sortBy: 'file'
            });
            parent.set('innerHTML', '');
            table.render(parent);
        }

        Y.on('domready', function () {
            replaceTable(Y.one('div.coverage-summary table'));
            if (typeof prettyPrint === 'function') {
                prettyPrint();
            }
        });
    });
</script>
</body>
</html>