Skip to content

Commit

Permalink
fix: remove work-around from istanbul-lib-instrument (#2121)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Oct 10, 2022
1 parent 052bc02 commit a24c873
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/coverage-istanbul/src/provider.ts
Expand Up @@ -78,8 +78,7 @@ export class IstanbulCoverageProvider implements CoverageProvider {
if (!this.testExclude.shouldInstrument(id))
return

// eslint-disable-next-line @typescript-eslint/no-unused-vars -- ignoreRestSiblings should be enabled
const { sourcesContent, ...sourceMap } = pluginCtx.getCombinedSourcemap()
const sourceMap = pluginCtx.getCombinedSourcemap()
const code = this.instrumenter.instrumentSync(sourceCode, id, sourceMap as any)
const map = this.instrumenter.lastSourceMap() as any

Expand Down Expand Up @@ -203,10 +202,7 @@ export class IstanbulCoverageProvider implements CoverageProvider {
this.instrumenter.instrumentSync(
transformResult.code,
filename,
{
...sourceMap,
version: sourceMap.version.toString(),
},
sourceMap as any,
)

const lastCoverage = this.instrumenter.lastFileCoverage()
Expand Down
1 change: 1 addition & 0 deletions pnpm-lock.yaml

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

0 comments on commit a24c873

Please sign in to comment.