File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import type {
8
8
Page ,
9
9
} from 'playwright-core'
10
10
import { Event } from 'jest-circus'
11
+ import type { JestEnvironmentConfig } from '@jest/environment'
11
12
import type {
12
13
BrowserType ,
13
14
ConfigDeviceType ,
@@ -114,9 +115,9 @@ export const getPlaywrightEnv = (basicEnv = 'node'): unknown => {
114
115
readonly _config : JestPlaywrightProjectConfig
115
116
_jestPlaywrightConfig ! : JestPlaywrightConfig
116
117
117
- constructor ( config : JestPlaywrightProjectConfig ) {
118
+ constructor ( config : JestEnvironmentConfig ) {
118
119
super ( config )
119
- this . _config = config . projectConfig
120
+ this . _config = config . projectConfig as JestPlaywrightProjectConfig
120
121
}
121
122
122
123
_getContextOptions ( devices : Playwright [ 'devices' ] ) : BrowserContextOptions {
Original file line number Diff line number Diff line change @@ -228,10 +228,7 @@ export interface JestPlaywrightConfig {
228
228
collectCoverage ?: boolean
229
229
}
230
230
231
- export type JestPlaywrightProjectConfig = (
232
- | Test [ 'context' ] [ 'config' ]
233
- | JestConfig
234
- ) & {
231
+ export type JestPlaywrightProjectConfig = Test [ 'context' ] [ 'config' ] & {
235
232
browserName : BrowserType
236
233
wsEndpoint : WsEndpointType
237
234
device : DeviceType
You can’t perform that action at this time.
0 commit comments