From 787953a5ccacca877efde0993d4cbb1694f1b320 Mon Sep 17 00:00:00 2001 From: Juan Fernandez Date: Thu, 19 Sep 2024 15:03:40 +0200 Subject: [PATCH] call super --- src/PlaywrightEnvironment.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PlaywrightEnvironment.ts b/src/PlaywrightEnvironment.ts index bd351c3..9b7b029 100644 --- a/src/PlaywrightEnvironment.ts +++ b/src/PlaywrightEnvironment.ts @@ -7,7 +7,7 @@ import type { ConnectOverCDPOptions, Page, } from 'playwright-core' -import { Event } from 'jest-circus' +import { Event, State } from 'jest-circus' import type { JestEnvironmentConfig } from '@jest/environment' import type { BrowserType, @@ -357,7 +357,10 @@ export const getPlaywrightEnv = (basicEnv = 'node'): unknown => { } } - async handleTestEvent(event: Event) { + async handleTestEvent(event: Event, state: State) { + if (super.handleTestEvent) { + await super.handleTestEvent(event, state) + } const { browserName } = this._config const { collectCoverage, haveSkippedTests } = this._jestPlaywrightConfig const browserType = getBrowserType(browserName)