-
Notifications
You must be signed in to change notification settings - Fork 290
Open
Description
π Bug Report
I'm trying to update Puppeteer, jest-puppeteer and expect-puppeteer to their latest versions and I'm encountering this issue:
FAIL test/browser.js
β Test suite failed to run
TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at Object.<anonymous> (node_modules/expect-puppeteer/dist/index.js:505:8)
The issue appears to happen here:
| Object.keys(jestExpect).forEach((prop) => { |
because jestExpect is undefined
To Reproduce
# Check out https://github.com/fregante/webext-dynamic-content-scripts/pull/63/commits/b428a7823f6317b5f508304f5893e061514967e2
npm install -D jest-puppeteer@latest expect-puppeteer@latest
npm run jest
The same also happens when upgrading to puppeteer 21 without updating those two dependencies.
Expected behavior
The tests should pass (or at least not throw in expect-puppeteer)
Run npx envinfo --system --binaries --npmPackages expect-puppeteer,jest-dev-server,jest-environment-puppeteer,jest-puppeteer,spawnd --markdown --clipboard
Paste the results here:
## System:
- OS: macOS 13.4.1
- CPU: (16) x64 Intel(R) Core(TM) i9
- Memory: 2.44 GB / 16.00 GB
- Shell: 3.6.1 - /usr/local/bin/fish
## Binaries:
- Node: 20.6.1 - /usr/local/bin/node
- Yarn: 1.22.11 - /usr/local/bin/yarn
- npm: 10.1.0 - /usr/local/bin/npm
## npmPackages:
- expect-puppeteer: ^9.0.0 => 9.0.0
- jest-puppeteer: ^9.0.0 => 9.0.0 Metadata
Metadata
Assignees
Labels
No labels