@hedia/test 2.0.0-alpha.0 → 2.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/test",
3
- "version": "2.0.0-alpha.0",
3
+ "version": "2.0.0-alpha.2",
4
4
  "description": "Custom Test Reporters",
5
5
  "type": "module",
6
6
  "exports": {
@@ -23,7 +23,11 @@ function coverage(event) {
23
23
  for (const file of event.data.summary.files) {
24
24
  const sourceMap = loadSourceMapForFile(file.path);
25
25
 
26
- for (const lineNumber of file.uncoveredLineNumbers) {
26
+ const uncoveredLines = file.lines
27
+ .filter((line) => line.count === 0)
28
+ .map((line) => line.line);
29
+
30
+ for (const lineNumber of uncoveredLines) {
27
31
  const entry = sourceMap.findOrigin(lineNumber, 1);
28
32
 
29
33
  if (entry) {
@@ -65,8 +69,12 @@ function loadSourceMapForFile(path) {
65
69
  return;
66
70
  }
67
71
 
72
+ console.log("sourceMappingURL", sourceMappingURL);
73
+
68
74
  const sourceMappingFile = resolve(dirname(path), sourceMappingURL);
69
75
 
76
+ console.log("sourceMappingFile", sourceMappingFile);
77
+
70
78
  const json = readFileSync(sourceMappingFile, "utf8");
71
79
  const payload = JSON.parse(json);
72
80