Skip to content

Commit

Permalink
Add mutable performance
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Dec 6, 2023
1 parent 82a49e0 commit f7acd6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defaults:
env:
CI_PULL_REQUEST: 1 # Skip nightly tests
NODE_ENV: test # Add instrumentation code
node-version: 18.x
node-version: 20.x
skip-secure-feed: false

jobs:
Expand Down
3 changes: 3 additions & 0 deletions __tests__/setup/setupMutablePerformance.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// HACK: Before we bump to jest@29, the performance object is marked as readonly in Node.js 20 and some latter versions of Node.js 18.
// Similar to https://github.com/facebook/react-native/issues/35701.
global.performance = { ...global.performance };
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ module.exports = {
'<rootDir>/__tests__/setup/setupCryptoGetRandomValues.js',
'<rootDir>/__tests__/setup/setupImageSnapshot.js',
'<rootDir>/__tests__/setup/setupTestNightly.js',
'<rootDir>/__tests__/setup/setupTimeout.js'
'<rootDir>/__tests__/setup/setupTimeout.js',
'<rootDir>/__tests__/setup/setupMutablePerformance.js'
],
testPathIgnorePatterns: [
'/lib/',
Expand Down

0 comments on commit f7acd6f

Please sign in to comment.