-
Notifications
You must be signed in to change notification settings - Fork 108
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
TypeError Since Node 19 #463
Comments
I've run into the same issue with node 19.0.1 on Mac OS Monterrey 12.6 |
Above you mention that Which one did you actually use? The latest one or If upgrading does not help, since Jest Reference: jestjs/jest#12055 (comment) |
@charlieyeng Reproducible with Jest 28. Not reproducible with Jest 29 and Node 19. This means you need to upgrade your Jest version.
|
Duplicate of #438, fwiw |
10.0.2
macOS Ventura 13.3.1
Node v20
"@jest/fake-timers": "^28.1.3"
What did you expect to happen?
I expect the
jest.useFakeTimers()
function to work out of the box.What actually happens
It works for Node v18, but upgrading my stack to Node v19 and beyond we run into the following errors.
TypeError: Cannot assign to read only property 'performance' of object '[object global]'
andCan't install fake timers twice on the same global object.
jest.useFakeTimers()
is backed by@sinon/fake-timers
Jest-ReferenceHow to reproduce
Have the latest node and jest versions installed
and attempt to call `jest.useFakeTimers() ie:
will result in failures.
Similar issues noted here: Bug and perhaps related to this
The text was updated successfully, but these errors were encountered: