mirror of
https://github.com/vitest-dev/vitest.git
synced 2026-02-01 17:36:51 +00:00
fix: remove work-around from istanbul-lib-instrument (#2121)
This commit is contained in:
parent
052bc02133
commit
a24c87344c
@ -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
|
||||
|
||||
@ -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()
|
||||
|
||||
1
pnpm-lock.yaml
generated
1
pnpm-lock.yaml
generated
@ -12887,6 +12887,7 @@ packages:
|
||||
semver: 6.3.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/istanbul-lib-report/3.0.0:
|
||||
resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user