jest-playwright icon indicating copy to clipboard operation
jest-playwright copied to clipboard

TypeScript Build Failure: global.d.ts(233,5): error TS2709: Cannot use namespace 'JestConfig' as a type.

Open mmichaelis opened this issue 3 years ago • 0 comments

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:

CodeSandbox Example

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"

mmichaelis avatar Aug 10 '22 05:08 mmichaelis