Skip to content

Upgrade to Jest 30#540

Merged
sorenlouv merged 1 commit intomainfrom
upgrade-jest-30
Jun 14, 2025
Merged

Upgrade to Jest 30#540
sorenlouv merged 1 commit intomainfrom
upgrade-jest-30

Conversation

@sorenlouv
Copy link
Copy Markdown
Owner

@sorenlouv sorenlouv commented Jun 14, 2025

Upgrades Jest to v30, aligns related configurations, and adds a global nock cleanup to prevent memory warnings.

  • Bumps jest to v30.0.0 and updates ts-jest
  • Introduces a global teardown for nock interceptors
  • Adjusts Jest config with worker memory limit and mock cleanup settings

@sorenlouv sorenlouv requested a review from Copilot June 14, 2025 22:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Upgrades Jest to v30, aligns related configurations, and adds a global nock cleanup to prevent memory warnings.

  • Bumps jest to v30.0.0 and updates ts-jest
  • Introduces a global teardown for nock interceptors
  • Adjusts Jest config with worker memory limit and mock cleanup settings

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/test/setupFiles/nock-cleanup.ts Adds an afterAll hook to clean and restore nock between test files
package.json Upgrades jest and ts-jest versions
jest.config.ts Adds nock-cleanup to setupFilesAfterEnv, sets workerIdleMemoryLimit and clearMocks
Comments suppressed due to low confidence (2)

jest.config.ts:25

  • [nitpick] The clearMocks: true option only resets mock call history and instances, but does not restore original implementations. If the goal is to restore mocks to their originals, consider using restoreMocks: true or update the comment to reflect the behavior of clearMocks.
// Jest 30 compatibility settings - less aggressive cleanup to preserve mocks

package.json:121

  • You’ve upgraded Jest to v30 but kept ts-jest at v29. Ensure that ts-jest supports Jest 30 or bump it to a compatible major version to avoid compatibility issues.
"ts-jest": "^29.4.0",

@sorenlouv sorenlouv merged commit c310a05 into main Jun 14, 2025
3 checks passed
@sorenlouv sorenlouv deleted the upgrade-jest-30 branch June 14, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants