Open
Conversation
- jest: ^29.7.0 → ^30.0.0 - @types/jest: ^29.5.12 → ^30.0.0 - ts-jest: ^29.1.1 → ^29.4.6
- Replace toThrowError() with toThrow() - Replace toBeCalledWith() with toHaveBeenCalledWith() - Update snapshots
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the repository’s Jest tooling to Jest 30 and updates tests/snapshots to account for removed/deprecated Jest APIs.
Changes:
- Bump Jest/@types/jest dependencies to Jest 30.
- Replace removed/deprecated Jest matchers in tests (e.g.,
toBeCalledWith→toHaveBeenCalledWith,toThrowError→toThrow). - Refresh snapshot headers to the updated Jest snapshot format/URL.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/github/tests/snapshots/lib.test.ts.snap | Updates snapshot header format/URL for Jest 30. |
| packages/exec/tests/exec.test.ts | Replaces deprecated Jest matchers and error assertions for Jest 30 compatibility. |
| packages/cache/tests/saveCacheV2.test.ts | Updates rejects.toThrowError to rejects.toThrow. |
| packages/cache/tests/saveCache.test.ts | Updates rejects.toThrowError to rejects.toThrow. |
| packages/cache/tests/restoreCacheV2.test.ts | Updates rejects.toThrowError to rejects.toThrow. |
| packages/cache/tests/restoreCache.test.ts | Updates rejects.toThrowError to rejects.toThrow. |
| packages/cache/tests/cacheUtils.test.ts | Updates toThrowError to toThrow. |
| packages/attest/tests/attest.test.ts | Updates rejects.toThrowError to rejects.toThrow. |
| packages/attest/tests/snapshots/provenance.test.ts.snap | Updates snapshot header format/URL for Jest 30. |
| packages/attest/tests/snapshots/intoto.test.ts.snap | Updates snapshot header format/URL for Jest 30. |
| packages/artifact/tests/util.test.ts | Updates toThrowError to toThrow. |
| packages/artifact/tests/upload-artifact.test.ts | Updates rejects.toThrowError to rejects.toThrow. |
| packages/artifact/tests/get-artifact.test.ts | Updates rejects.toThrowError to rejects.toThrow. |
| packages/artifact/tests/artifact-http-client.test.ts | Updates rejects.toThrowError to rejects.toThrow. |
| package.json | Bumps Jest/@types/jest versions and updates ts-jest version; minor formatting cleanup. |
| package-lock.json | Lockfile refresh reflecting Jest 30 dependency tree changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Jest 30 removed a few deprecated functions that we need to fixup. This PR handles upgrading the related packages and fixes the broken tests.