Skip to content

Commit 3baa644

Browse files
committed
Update coverage data
1 parent f4fb0a4 commit 3baa644

File tree

8 files changed

+189
-2263
lines changed

8 files changed

+189
-2263
lines changed

coverage/clover.xml

+3-656
Large diffs are not rendered by default.

coverage/coverage-final.json

+1-39
Large diffs are not rendered by default.

coverage/lcov-report/base.css

+19-7
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,15 @@ table.coverage td span.cline-any {
152152
background-position: 0 -10px;
153153
}
154154
.status-line { height: 10px; }
155+
/* yellow */
156+
.cbranch-no { background: yellow !important; color: #111; }
155157
/* dark red */
156158
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
157159
.low .chart { border:1px solid #C21F39 }
160+
.highlighted,
161+
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
162+
background: #C21F39 !important;
163+
}
158164
/* medium red */
159165
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
160166
/* light red */
@@ -166,19 +172,25 @@ table.coverage td span.cline-any {
166172
/* dark green */
167173
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
168174
.high .chart { border:1px solid rgb(77,146,33) }
169-
170-
171-
.medium .chart { border:1px solid #666; }
172-
.medium .cover-fill { background: #666; }
173-
174-
.cbranch-no { background: yellow !important; color: #111; }
175+
/* dark yellow (gold) */
176+
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
177+
.medium .chart { border:1px solid #f9cd0b; }
178+
/* light yellow */
179+
.medium { background: #fff4c2; }
175180

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

180185
span.cline-neutral { background: #eaeaea; }
181-
.medium { background: #eaeaea; }
186+
187+
.coverage-summary td.empty {
188+
opacity: .5;
189+
padding-top: 4px;
190+
padding-bottom: 4px;
191+
line-height: 1;
192+
color: #888;
193+
}
182194

183195
.cover-fill, .cover-empty {
184196
display:inline-block;
+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/* eslint-disable */
2+
var jumpToCode = (function init() {
3+
// Classes of code we would like to highlight in the file view
4+
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5+
6+
// Elements to highlight in the file listing view
7+
var fileListingElements = ['td.pct.low'];
8+
9+
// We don't want to select elements that are direct descendants of another match
10+
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11+
12+
// Selecter that finds elements on the page to which we can jump
13+
var selector =
14+
fileListingElements.join(', ') +
15+
', ' +
16+
notSelector +
17+
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18+
19+
// The NodeList of matching elements
20+
var missingCoverageElements = document.querySelectorAll(selector);
21+
22+
var currentIndex;
23+
24+
function toggleClass(index) {
25+
missingCoverageElements
26+
.item(currentIndex)
27+
.classList.remove('highlighted');
28+
missingCoverageElements.item(index).classList.add('highlighted');
29+
}
30+
31+
function makeCurrent(index) {
32+
toggleClass(index);
33+
currentIndex = index;
34+
missingCoverageElements.item(index).scrollIntoView({
35+
behavior: 'smooth',
36+
block: 'center',
37+
inline: 'center'
38+
});
39+
}
40+
41+
function goToPrevious() {
42+
var nextIndex = 0;
43+
if (typeof currentIndex !== 'number' || currentIndex === 0) {
44+
nextIndex = missingCoverageElements.length - 1;
45+
} else if (missingCoverageElements.length > 1) {
46+
nextIndex = currentIndex - 1;
47+
}
48+
49+
makeCurrent(nextIndex);
50+
}
51+
52+
function goToNext() {
53+
var nextIndex = 0;
54+
55+
if (
56+
typeof currentIndex === 'number' &&
57+
currentIndex < missingCoverageElements.length - 1
58+
) {
59+
nextIndex = currentIndex + 1;
60+
}
61+
62+
makeCurrent(nextIndex);
63+
}
64+
65+
return function jump(event) {
66+
switch (event.which) {
67+
case 78: // n
68+
case 74: // j
69+
goToNext();
70+
break;
71+
case 66: // b
72+
case 75: // k
73+
case 80: // p
74+
goToPrevious();
75+
break;
76+
}
77+
};
78+
})();
79+
window.addEventListener('keydown', jumpToCode);

0 commit comments

Comments
 (0)