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
● Test suite failed to run
TypeError: Cannot assign to read only property 'performance' of object '[object global]'
at Object.<anonymous> (node_modules/react-native/jest/setup.js:419:20)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
Additional context
The problem is in the following lines in jest/setup.js
global.performance = {
now: jest.fn(Date.now),
};
If they are removed, Jest works as expected. Alternatively, downgrading to Node 18 resolves the issue as well.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Version
28.1.3
Steps to reproduce
Have node 19.x installed and run
npx jest
Expected behavior
Tests run successfully
Actual behavior
For each test suite I get
Additional context
The problem is in the following lines in
jest/setup.js
If they are removed, Jest works as expected. Alternatively, downgrading to Node 18 resolves the issue as well.
Environment
System: OS: macOS 12.6 CPU: (10) arm64 Apple M1 Pro Binaries: Node: 19.0.1 - /opt/homebrew/bin/node npm: 8.19.2 - /opt/homebrew/bin/npm npmPackages: jest: 28.1.3 => 28.1.3
The text was updated successfully, but these errors were encountered: