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
The performance global introduced in Node.js 16.0.0 seems unavailable in the test environment.
To Reproduce
On Node 16.0.0 or greater:
mkdir perf &&cd perf
npm init -y
echo'console.log(performance.now())'> test.js
npm install jest
npx jest
Expected behavior
No error
Actual behavior
FAIL ./test.js
● Test suite failed to run
ReferenceError: performance is not defined
> 1 | console.log(performance.now())
| ^
2 |
at Object.<anonymous> (test.js:1:1)
at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
The text was updated successfully, but these errors were encountered:
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.
🐛 Bug Report
The
performance
global introduced in Node.js 16.0.0 seems unavailable in the test environment.To Reproduce
On Node 16.0.0 or greater:
Expected behavior
No error
Actual behavior
The text was updated successfully, but these errors were encountered: