diff --git a/test/blanket_mocha.js b/test/blanket_mocha.js
index 64c75afd..ccab2993 100644
--- a/test/blanket_mocha.js
+++ b/test/blanket_mocha.js
@@ -4482,7 +4482,7 @@ blanket.defaultReporter = function(coverage){
return typeof coverage.files[elem].branchData !== 'undefined';
}),
bodyContent = "
Coverage (%)
Covered/Total Smts.
"+(hasBranchTracking ? "
Covered/Total Branches
":"")+"
",
- fileTemplate = "
{{percentage}} %
{{numberCovered}}/{{totalSmts}}
"+( hasBranchTracking ? "
{{passedBranches}}/{{totalBranches}}
" : "" )+"
{{source}}
";
+ fileTemplate = "
{{percentage}} %
{{numberCovered}}/{{totalSmts}}
"+( hasBranchTracking ? "
{{passedBranches}}/{{totalBranches}}
" : "" )+"
{{source}}
";
grandTotalTemplate = "
{{rowTitle}}
{{percentage}} %
{{numberCovered}}/{{totalSmts}}
"+( hasBranchTracking ? "
{{passedBranches}}/{{totalBranches}}
" : "" ) + "
";
function blanket_toggleSource(id) {
@@ -4802,6 +4802,22 @@ blanket.defaultReporter = function(coverage){
}else{
appendTag('div', body, bodyContent);
}
+
+ fileNumber = 0;
+ for(var file in files) {
+ if (!files.hasOwnProperty(file)) {
+ continue;
+ }
+
+ fileNumber++;
+ var _ = function() {
+ var localFN = fileNumber;
+ $("#blanket-link-file-" + fileNumber).click(function() {
+ blanket_toggleSource("file-" + localFN);
+ });
+ }();
+ }
+
//appendHtml(body, '
');
};