Skip to content

Commit 9984ba1

Browse files
perf: don't perform V8 instrumenting if !collectCoverage (#13282)
1 parent f126336 commit 9984ba1

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
### Performance
2020

21+
- `[jest-runner]` Do not instrument v8 coverage data if coverage should not be collected [#13282](https://github.com/facebook/jest/pull/13282)
22+
2123
## 29.1.2
2224

2325
### Fixes

packages/jest-runner/src/runTest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ async function runTestInternal(
280280

281281
// if we don't have `getVmContext` on the env skip coverage
282282
const collectV8Coverage =
283+
globalConfig.collectCoverage &&
283284
globalConfig.coverageProvider === 'v8' &&
284285
typeof environment.getVmContext === 'function';
285286

0 commit comments

Comments
 (0)