Skip to content

Commit

Permalink
fix undefined str variable for html coverage
Browse files Browse the repository at this point in the history
Order for variables definition is wrong in 3f78f10,
so, html coverage page print `<undefined></undefined>`
because str is undefined in `jade.compile(str, { filename: file });`.
  • Loading branch information
outsideris committed Aug 15, 2015
1 parent 03af0fe commit 283ad65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reporters/html-cov.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ exports = module.exports = HTMLCov;
function HTMLCov(runner) {
var jade = require('jade');
var file = join(__dirname, '/templates/coverage.jade');
var str = readFileSync(file, 'utf8');
var fn = jade.compile(str, { filename: file });
var self = this;
var str = readFileSync(file, 'utf8');

JSONCov.call(this, runner, false);

Expand Down

0 comments on commit 283ad65

Please sign in to comment.