ortoni-report 4.1.0-test.1 → 4.1.0-test.3

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/dist/cli.js CHANGED
@@ -710,17 +710,19 @@ async function mergeAllData(options = {}) {
710
710
  }
711
711
  const rawShardDur = shardData.duration;
712
712
  let durToAdd = 0;
713
+ let perTestSum = 0;
713
714
  if (typeof rawShardDur === "number") {
714
715
  durToAdd = rawShardDur;
715
716
  } else {
716
- durToAdd = Array.isArray(shardData.results) ? shardData.results.reduce(
717
+ perTestSum = Array.isArray(shardData.results) ? shardData.results.reduce(
717
718
  (acc, t) => acc + (Number(t?.duration) || 0),
718
719
  0
719
720
  ) : 0;
721
+ durToAdd = perTestSum;
720
722
  }
721
- shardDurMap[file] = durToAdd;
722
723
  totalDurationSum += durToAdd;
723
724
  if (durToAdd > totalDurationMax) totalDurationMax = durToAdd;
725
+ shardDurMap[file] = durToAdd;
724
726
  if (shardData.userConfig) {
725
727
  if (!mergedUserConfig) mergedUserConfig = { ...shardData.userConfig };
726
728
  else {
@@ -809,7 +811,7 @@ async function mergeAllData(options = {}) {
809
811
  outputFileName,
810
812
  finalReportData
811
813
  );
812
- console.log(`\u2705 Final merged report generated at ${outputPath}`);
814
+ console.log(`\u2705 Final merged report generated at ${await outputPath}`);
813
815
  console.log(`\u2705 Shards merged: ${sortedFiles.length}`);
814
816
  console.log(`\u2705 Tests per shard:`, shardCounts);
815
817
  console.log(`\u2705 Total tests merged ${allResults.length}`);
package/dist/cli.mjs CHANGED
@@ -66,17 +66,19 @@ async function mergeAllData(options = {}) {
66
66
  }
67
67
  const rawShardDur = shardData.duration;
68
68
  let durToAdd = 0;
69
+ let perTestSum = 0;
69
70
  if (typeof rawShardDur === "number") {
70
71
  durToAdd = rawShardDur;
71
72
  } else {
72
- durToAdd = Array.isArray(shardData.results) ? shardData.results.reduce(
73
+ perTestSum = Array.isArray(shardData.results) ? shardData.results.reduce(
73
74
  (acc, t) => acc + (Number(t?.duration) || 0),
74
75
  0
75
76
  ) : 0;
77
+ durToAdd = perTestSum;
76
78
  }
77
- shardDurMap[file] = durToAdd;
78
79
  totalDurationSum += durToAdd;
79
80
  if (durToAdd > totalDurationMax) totalDurationMax = durToAdd;
81
+ shardDurMap[file] = durToAdd;
80
82
  if (shardData.userConfig) {
81
83
  if (!mergedUserConfig) mergedUserConfig = { ...shardData.userConfig };
82
84
  else {
@@ -165,7 +167,7 @@ async function mergeAllData(options = {}) {
165
167
  outputFileName,
166
168
  finalReportData
167
169
  );
168
- console.log(`\u2705 Final merged report generated at ${outputPath}`);
170
+ console.log(`\u2705 Final merged report generated at ${await outputPath}`);
169
171
  console.log(`\u2705 Shards merged: ${sortedFiles.length}`);
170
172
  console.log(`\u2705 Tests per shard:`, shardCounts);
171
173
  console.log(`\u2705 Total tests merged ${allResults.length}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ortoni-report",
3
- "version": "4.1.0-test.1",
3
+ "version": "4.1.0-test.3",
4
4
  "description": "Playwright Report By LetCode with Koushik",
5
5
  "scripts": {
6
6
  "tsc": "tsc",