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 = "
results
Coverage (%)
Covered/Total Smts.
"+(hasBranchTracking ? "
Covered/Total Branches
":"")+"
", - fileTemplate = "
{{fileNumber}}.{{file}}
{{percentage}} %
{{numberCovered}}/{{totalSmts}}
"+( hasBranchTracking ? "
{{passedBranches}}/{{totalBranches}}
" : "" )+"
"; + fileTemplate = "
{{fileNumber}}.{{file}}
{{percentage}} %
{{numberCovered}}/{{totalSmts}}
"+( hasBranchTracking ? "
{{passedBranches}}/{{totalBranches}}
" : "" )+"
"; 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, '
'); };