Skip to content

Commit

Permalink
fix(middleware-code-coverage): watermarks bug
Browse files Browse the repository at this point in the history
sequential calls with FE config of the watermarks had wrong behaviour-
the config was stashed and was reused for the next call
if not explicitly overwritten
  • Loading branch information
d3xter666 committed Sep 7, 2023
1 parent fd1ae09 commit e092294
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/middleware-code-coverage/lib/coverage-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export default async function(coverageData, config, resources, log) {

const coverageMap =
istanbulLibCoverage.createCoverageMap(globalCoverageMap);
const {report: reportConfig} = config;
const {report} = config;
const reportConfig = {...report};

// Frontend config for watermarks should take precedence if present.
reportConfig.watermarks = {...reportConfig.watermarks, ...watermarks};
Expand Down

0 comments on commit e092294

Please sign in to comment.