Skip to content

Commit 0b4e755

Browse files
authored
Fix jest types (#747)
* Fix jest types * Fix JestPlaywrightProjectConfig
1 parent fbc5591 commit 0b4e755

File tree

3 files changed

+40
-166
lines changed

3 files changed

+40
-166
lines changed

package-lock.json

Lines changed: 36 additions & 160 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"jest": "27.0.4",
7777
"jest-circus": "27.0.4",
7878
"jest-environment-node": "27.0.3",
79-
"jest-runner": "27.0.1",
79+
"jest-runner": "27.0.4",
8080
"lint-staged": "11.0.0",
8181
"playwright": ">=1.2.0",
8282
"playwright-chromium": ">=1.2.0",

types/global.d.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
devices,
1313
} from 'playwright-core'
1414
import { Config as JestConfig } from '@jest/types'
15-
import { Context } from 'jest-runner/build/types'
1615
import { Test } from 'jest-runner'
1716
import { JestProcessManagerOptions } from 'jest-process-manager'
1817

@@ -217,18 +216,17 @@ export interface JestPlaywrightConfig {
217216
collectCoverage?: boolean
218217
}
219218

220-
export interface JestPlaywrightProjectConfig extends JestConfig.ProjectConfig {
219+
export type JestPlaywrightProjectConfig = Test['context']['config'] & {
221220
browserName: BrowserType
222221
wsEndpoint: WsEndpointType
223222
device: DeviceType
224-
extensionsToTreatAsEsm: string[]
225223
}
226224

227-
interface JestPlaywrightContext extends Context {
225+
export type JestPlaywrightContext = Omit<Test['context'], 'config'> & {
228226
config: JestPlaywrightProjectConfig
229227
}
230228

231-
export interface JestPlaywrightTest extends Test {
229+
export type JestPlaywrightTest = Omit<Test, 'context'> & {
232230
context: JestPlaywrightContext
233231
}
234232

0 commit comments

Comments
 (0)