Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
zuki-linB committed Jul 31, 2023
2 parents bd6ae3d + 1864e6f commit b53061a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ async function run(): Promise<void> {
const codeCoverageOld = <CoverageReport>(
JSON.parse(fs.readFileSync(mainBranchCoverageSummaryFileName).toString())
)
const initAcc: CoverageReport = {}
const entries = Object.entries(codeCoverageOld)
const resolvedCodeCoverageOld = entries.reduce((acc, [key, value]) => {
if (codeCoverageNew[key]) {
acc[key] = value
}
return acc
}, initAcc)
const resolvedCodeCoverageOld = Object.entries(codeCoverageOld).reduce(
(acc, [key, value]) => {
if (codeCoverageNew[key]) {
// @ts-ignore
acc[key] = value
}
return acc
},
{}
)
const currentDirectory = execSync('pwd')
.toString()
.trim()
Expand Down

0 comments on commit b53061a

Please sign in to comment.