Skip to content

Conversation

@danwkennedy
Copy link
Contributor

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.

- 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
Copilot AI review requested due to automatic review settings January 30, 2026 14:45
@danwkennedy danwkennedy requested review from a team as code owners January 30, 2026 14:45
@danwkennedy danwkennedy changed the title Upgrade/jest-30 Upgrade jest to v30.x Jan 30, 2026
Copy link
Contributor

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 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., toBeCalledWithtoHaveBeenCalledWith, toThrowErrortoThrow).
  • 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.

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