Open
Description
Is your feature request related to a problem? Please describe.
This is specifically a problem for libraries intercepting jest-environment-*
libraries to create integrations.
In this specific line:
async handleTestEvent(event: Event) {
const { browserName } = this._config
const { collectCoverage, haveSkippedTests } = this._jestPlaywrightConfig
const browserType = getBrowserType(browserName)
//...
we're not calling super.handleTestEvent
which would help said libraries.
Describe the solution you'd like
Change to above to
async handleTestEvent(event: Event) {
// calling `super.handleTestEvent` in case it's there
if (super.handleTestEvent) {
await super.handleTestEvent.apply(this, arguments)
}
const { browserName } = this._config
const { collectCoverage, haveSkippedTests } = this._jestPlaywrightConfig
const browserType = getBrowserType(browserName)
//...
This would help:
- in case
jest-environment-*
libraries decide to implement their ownhandleTestEvent
- with Datadog's test visibility library, making it easier to integrate both libraries
Describe alternatives you've considered
Calling super.handleTestEvent
seems low risk, so no alternatives were considered.
Metadata
Metadata
Assignees
Labels
No labels