Skip to content

Commit

Permalink
chore: fix more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
aorinevo committed Mar 28, 2020
1 parent 4a193a2 commit ae0db0f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions lib/reporters/html/partials/cov.js
Expand Up @@ -4,7 +4,7 @@ const { file } = require('./file');

exports.cov = (coverage) => {

`<div id="coverage">
return `<div id="coverage">
<h1>Code Coverage Report</h1>
<div class="stats ${coverage.percentClass}">
<div class="percentage">${coverage.percent}}%</div>
Expand All @@ -17,11 +17,10 @@ exports.cov = (coverage) => {
<label for="show-generated">Show generated files</label>
</div>
<div id="files">
${coverage.cov.files.map((item, i) =>
${coverage.cov.files.map((item, i) => {
`
${file(item)}
`)}
return file(item);
})}
</div>
</div>`;
};
2 changes: 1 addition & 1 deletion lib/reporters/html/partials/file.js
Expand Up @@ -26,7 +26,7 @@ exports.file = (item) => {
</thead>
<tbody>
${item.source ?
`
`
${Object.entries(item.source).forEach((subitem,i) =>
`
Expand Down
3 changes: 2 additions & 1 deletion lib/reporters/html/partials/menu.js
Expand Up @@ -6,10 +6,11 @@ exports.menu = (coverage, lint) => {
<li><a href="#tests">Test Report</a></li>
<li><a href="#coverage">Coverage Report</a></li>
${coverage.cov.files.map((item,i) => {
return `<li class="${item.sourcemaps ? `generated` : ``}">
<span class="cov ${item.percentClass}">${item.percent}</span>
<a href="#${item.filename}">${item.dirname ? `<span class="dirname">${item.dirname}</span>` : ``}<span class="basename">${item.basename}</span></a>
</li>`
</li>`;
})}
<li><a href="#linting">Linting Report</a></li>
${lint.lint.map((item,i) => {
Expand Down

0 comments on commit ae0db0f

Please sign in to comment.