Skip to content

Commit

Permalink
perf: don't perform V8 instrumenting if !collectCoverage (#13282)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchhentgesspotify authored Oct 8, 2022
1 parent f126336 commit 9984ba1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

### Performance

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

## 29.1.2

### Fixes
Expand Down
1 change: 1 addition & 0 deletions packages/jest-runner/src/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ async function runTestInternal(

// if we don't have `getVmContext` on the env skip coverage
const collectV8Coverage =
globalConfig.collectCoverage &&
globalConfig.coverageProvider === 'v8' &&
typeof environment.getVmContext === 'function';

Expand Down

0 comments on commit 9984ba1

Please sign in to comment.