jest-playwright: page is not defined

Getting page is not defined when running jest.

I’ve installed jest-playwright-preset playwright-core playwright

and added the preset to my jest.config.js. preset: 'jest-playwright-preset'

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@ubcent sorry for late response. I can confirm that there is a problem with ts declaration file. ts 3.5 just don’t like this imports:

import type {
  Page,
  Browser,
  BrowserContext,
  BrowserType as PlaywrightBrowserType,
  ChromiumBrowser,
  FirefoxBrowser,
  WebKitBrowser,
} from 'playwright-core'

I’ll fix it in new release