Skip to content

Commit 0741ac4

Browse files
simongtj
authored andcommitted
Sorted the results in the json coverage reporter on their filename.
1 parent 14ce75e commit 0741ac4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/reporters/json-cov.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ function map(cov) {
8080
ret.sloc += data.sloc;
8181
}
8282

83+
ret.files.sort(function(a, b) {
84+
return a.filename.localeCompare(b.filename);
85+
});
86+
8387
if (ret.sloc > 0) {
8488
ret.coverage = (ret.hits / ret.sloc) * 100;
8589
}

0 commit comments

Comments
 (0)