diff --git a/packages/canyon-backend/src/apps/collect/services/coverage-client.service.ts b/packages/canyon-backend/src/apps/collect/services/coverage-client.service.ts index 957cae5f..4f3b3a3a 100755 --- a/packages/canyon-backend/src/apps/collect/services/coverage-client.service.ts +++ b/packages/canyon-backend/src/apps/collect/services/coverage-client.service.ts @@ -32,9 +32,9 @@ export class CoverageClientService { - + // 暂时解决方案,需要解决sourceMap问题 const {coverage} =await formatReportObject({ - coverage: resetCoverageData(regularData(oldcoverage)), + coverage: (regularData(oldcoverage)), instrumentCwd: invoke.instrumentCwd, }) diff --git a/packages/canyon-backend/src/utils/coverage.ts b/packages/canyon-backend/src/utils/coverage.ts index 67bdcddb..e436458d 100644 --- a/packages/canyon-backend/src/utils/coverage.ts +++ b/packages/canyon-backend/src/utils/coverage.ts @@ -27,7 +27,8 @@ export async function formatReportObject(c: any) { // 去除斜杠\\ const removeSlash = (x: any) => JSON.parse(JSON.stringify(x).replace(/\\\\/g, "/")); - const coverage = removeSlash(await remapCoverage(c.coverage)); + // 暂时解决方案,需要解决sourceMap问题 + const coverage = removeSlash(c.coverage); const instrumentCwd = removeSlash(c.instrumentCwd); const projectInstrumentCwd = removeSlash(c.projectInstrumentCwd || ""); const reversePath = (p: string) => {