You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Native types resolution for jest-puppeteer is not supported if jest types are imported with @jest/globals.
To Reproduce
Follow the installation procedure detailed in the "Getting started" section of jest-puppeteer README.
Complete the specific setup steps for typescript detailed in "Troubleshooting/TypeScript".
Uninstall @types/jest and write a test that relies on explicit imports from @jest/globals for types resolution.
Types resolution fails : expect-puppeteer matchers are flagged as nonexistent by typescript.
If we try to import expect from expect-puppeteer instead of @jest/globals, the native jest matchers are then flagged as nonexistent.
Expected behavior
Types resolution for expect-puppeteer matchers should work consistently whether the user chooses to import jest types from @types/jest or @jest/globals.
🐛 Bug Report
Native types resolution for
jest-puppeteer
is not supported if jest types are imported with@jest/globals
.To Reproduce
@types/jest
and write a test that relies on explicit imports from@jest/globals
for types resolution.expect-puppeteer
matchers are flagged as nonexistent by typescript.expect
fromexpect-puppeteer
instead of@jest/globals
, the native jest matchers are then flagged as nonexistent.Expected behavior
Types resolution for
expect-puppeteer
matchers should work consistently whether the user chooses to import jest types from@types/jest
or@jest/globals
.Link to repl or repo (highly encouraged)
Repo here
Issues without a reproduction link are likely to stall.
Run
npx envinfo --system --binaries --npmPackages expect-puppeteer,jest-dev-server,jest-environment-puppeteer,jest-puppeteer,spawnd --markdown --clipboard
Paste the results here:
The text was updated successfully, but these errors were encountered: