Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 30, 2024
1 parent 0fcc38d commit aa5edfc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/canyon-collect/src/utils/coverage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ export function formatReportObject(c: any) {
};
const obj: any = {};
for (const coverageKey in coverage) {
obj[reversePath(coverageKey)] = {
...coverage[coverageKey],
path: reversePath(coverageKey),
};
// 这里是特殊逻辑,只有他们不想等的时候才是成功替换过的
if (reversePath(coverageKey) !== coverageKey) {
obj[reversePath(coverageKey)] = {
...coverage[coverageKey],
path: reversePath(coverageKey),
};
}
}

// 确保修改成istanbul格式,去掉start、end为空的情况
Expand Down

0 comments on commit aa5edfc

Please sign in to comment.