Skip to content

Commit

Permalink
add to fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
DawidNiezgodka committed Dec 26, 2023
1 parent c77e6dd commit 339a487
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,8 @@ module.exports.mergeResults = function(directory, strategies, outputFile, metric
throw new Error(`Invalid strategy: ${strategy}. Valid strategies are sum, average, min, max, median.`);
}
const values = metricsValues.get(metric.name);
metric.value = module.exports.applyStrategy(strategy, values);
let rawValue = module.exports.applyStrategy(strategy, values);
metric.value = Number(rawValue).toFixed(2);
});

fs.writeFileSync(outputFile, JSON.stringify(mergedData, null, 2));
Expand Down

0 comments on commit 339a487

Please sign in to comment.