jest-playwright
jest-playwright copied to clipboard
TypeScript Build Failure: global.d.ts(233,5): error TS2709: Cannot use namespace 'JestConfig' as a type.
Describe the bug
We just tried migrating to jest-playwright 2.0.0, especially because of Jest 28 upgrade, as provided by #801. Unfortunately, build fails with:
.../[email protected]_qruclkpwe5tgscr3gxibacztji/node_modules/jest-playwright-preset/types/global.d.ts(233,5):
error TS2709: Cannot use namespace 'JestConfig' as a type.
To Reproduce
Update to Jest-Playwright 2.0.0, use it with TypeScript and don't enable compiler option skipLibCheck (see TypeScript: TSConfig Reference).
See also at CodeSandbox:

Expected behavior
Build passes.
Desktop (please complete the following information):
- OS: Windows
- Playwright version: 2.0.0
- jest-playwright version: 1.24.2
- Jest: 28.1.3
@types/jest: 28.1.6"