Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running on jest@29.4.0 #512

Closed
colinrotherham opened this issue Jan 25, 2023 · 2 comments
Closed

Error running on jest@29.4.0 #512

colinrotherham opened this issue Jan 25, 2023 · 2 comments

Comments

@colinrotherham
Copy link
Contributor

colinrotherham commented Jan 25, 2023

πŸ› Bug Report

Hello πŸ‘‹

Running tests under jest@29.4.0 throws the following error for

  • jest-puppeteer
  • jest-environment-puppeteer
  ● Test suite failed to run

    TypeError: Cannot read properties of undefined (reading 'bind')

      at Runtime._createJestObjectFor (node_modules/jest-runtime/build/index.js:2099:64)

To Reproduce

Steps to reproduce the behavior:

  1. Upgrade to jest@29.4.0
  2. Run tests

Expected behavior

Tests to run as expected

The fix

It appears that the older dependency jest-environment-node@27.5.1 is no longer compatible

But overriding locally via package.json works:

"overrides": {
  "jest-environment-node": "^29.4.0"
}

Hope this helps

@colinrotherham
Copy link
Contributor Author

Due to this project supporting Node.js 12+ (npm v6) it'd take a breaking change to move jest-environment-node toΒ dependencies β†’ peerDependencies where npm v7 would install it automatically.

Similarly raising the minimum version of Jest to v27.0.4 would include jest-environment-node:

"jest-environment-jsdom": "^27.0.3",
"jest-environment-node": "^27.0.3",

That said, it looks like this may be already fixed in:

Released in jest@29.4.1 😊

@colinrotherham
Copy link
Contributor Author

Confirming as fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants