Skip to content

Commit

Permalink
clean up jest
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-fernandez committed Feb 13, 2025
1 parent 3315dbe commit a6ee843
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/datadog-instrumentations/src/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ let isEarlyFlakeDetectionFaulty = false
let hasFilteredSkippableSuites = false
let isKnownTestsEnabled = false
let isQuarantinedTestsEnabled = false
let quarantinedTests = {} // TODO: dictionary?
let quarantinedTests = {}

const sessionAsyncResource = new AsyncResource('bound-anonymous-fn')

Expand Down Expand Up @@ -838,6 +838,7 @@ function configureTestEnvironment (readConfigsResult) {
sessionAsyncResource.runInAsyncScope(() => {
testSessionConfigurationCh.publish(configs.map(config => config.testEnvironmentOptions))
})
// We can't directly use isCodeCoverageEnabled when reporting coverage in `jestAdapterWrapper`
// because `jestAdapterWrapper` runs in a different process. We have to go through `testEnvironmentOptions`
configs.forEach(config => {
config.testEnvironmentOptions._ddTestCodeCoverageEnabled = isCodeCoverageEnabled
Expand Down

0 comments on commit a6ee843

Please sign in to comment.