Skip to content

Commit

Permalink
Sorted the results in the json coverage reporter on their filename.
Browse files Browse the repository at this point in the history
  • Loading branch information
simong authored and tj committed Nov 6, 2012
1 parent 14ce75e commit 0741ac4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/reporters/json-cov.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ function map(cov) {
ret.sloc += data.sloc;
}

ret.files.sort(function(a, b) {
return a.filename.localeCompare(b.filename);
});

if (ret.sloc > 0) {
ret.coverage = (ret.hits / ret.sloc) * 100;
}
Expand Down

0 comments on commit 0741ac4

Please sign in to comment.