@hedia/test
Advanced tools
Comparing version 2.0.0-alpha.2 to 2.0.0-alpha.3
{ | ||
"name": "@hedia/test", | ||
"version": "2.0.0-alpha.2", | ||
"version": "2.0.0-alpha.3", | ||
"description": "Custom Test Reporters", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -26,14 +26,12 @@ import { attr, element, render } from "@hedia/html"; | ||
const uncoveredLines = file.lines | ||
.filter((line) => line.count === 0) | ||
.map((line) => line.line); | ||
for (const line of file.lines) { | ||
const entry = sourceMap?.findOrigin(line.line, 1); | ||
for (const lineNumber of uncoveredLines) { | ||
const entry = sourceMap.findOrigin(lineNumber, 1); | ||
if (entry) { | ||
originalFiles[entry.fileName] = | ||
originalFiles[entry.fileName] || new Set(); | ||
const originalFile = (originalFiles[entry.fileName] = | ||
originalFiles[entry.fileName] || new Map()); | ||
originalFiles[entry.fileName].add(entry.lineNumber); | ||
const count = (originalFile.get(entry.lineNumber) || 0) + line.count; | ||
originalFiles[entry.fileName].set(entry.lineNumber, count); | ||
} | ||
@@ -51,7 +49,7 @@ } | ||
attr("path", fileName), | ||
...Array.from(lines).map((line) => | ||
...Array.from(lines).map(([number, count]) => | ||
element( | ||
"lineToCover", | ||
attr("lineNumber", line.toString()), | ||
attr("covered", "false") | ||
attr("lineNumber", number.toString()), | ||
attr("covered", count ? "true" : "false") | ||
) | ||
@@ -58,0 +56,0 @@ ) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6163
155