Skip to content

chore(deps-dev): bump the jest family to 30.5.1 together + group it for dependabot - #685

Merged
genwave-radio merged 2 commits into
mainfrom
chore/jest-family-30.5.1
Sep 4, 2026
Merged

genwave-radio merged 2 commits into
mainfrom
chore/jest-family-30.5.1

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

🐛 What

Supersedes #682 (@jest/globals alone, red) and #683 (jest-environment-jsdom alone, green by luck). Dependabot should auto-close both once this merges.

🔍 Why #682 fails

Every jest package pins its siblings to the exact same version. @jest/globals 30.5.1 demands @jest/expect 30.5.1, while the still-30.4.2 jest keeps @jest/expect 30.4.1 hoisted, so npm nests a second copy under @jest/globals (plus 35 other nested duplicates in that lockfile).

The specs import @testing-library/jest-dom/jest-globals, which augments Matchers on the top-level copy. expect from @jest/globals comes from the nested copy and never sees the augmentation:

error TS2339: Property 'toBeInTheDocument' does not exist on type 'Matchers<void, HTMLElement> ...'

Reproduced on the #682 branch: 1,455 errors in typecheck:specs. Same rule that bit the 29→30 move in July.

✅ Fix

  1. npm install -D jest@30.5.1 @jest/globals@30.5.1 jest-environment-jsdom@30.5.1 jest-environment-node@30.5.1 in one go. The lockfile ends with a single @jest/expect and no nested @jest/globals.
  2. .github/dependabot.yml: a groups entry for the jest family (jest, @jest/*, jest-environment-*) so future trains arrive as one PR. ts-jest stays out on its own 29.x cadence.

🧪 Verified locally

Step Result
typecheck:specs 0 errors
tsc --noEmit clean
jest 1,261 passed, 123 suites
lint 0 errors (20 pre-existing warnings)
next build OK

…or dependabot

Supersedes #682 (@jest/globals alone) and #683 (jest-environment-jsdom alone).

#682 failed the admin-ui typecheck:specs step with 1,455 TS2339 errors
("Property 'toBeInTheDocument' does not exist on type 'Matchers<...>'").
Every jest package pins its siblings to the exact same version, so
@jest/globals 30.5.1 demanded @jest/expect 30.5.1 while jest 30.4.2 kept
@jest/expect 30.4.1 hoisted; npm nested a second copy under @jest/globals.
The specs' `@testing-library/jest-dom/jest-globals` import augments the
top-level copy, but `expect` from @jest/globals came from the nested one and
never saw the matchers.

Fix: jest, @jest/globals, jest-environment-jsdom, jest-environment-node move
to 30.5.1 in one `npm install`, leaving a single @jest/expect in the lockfile.
A dependabot `groups` entry for the family (jest, @jest/*, jest-environment-*)
makes future bumps arrive as one PR instead of a failing series; ts-jest
stays out on its own 29.x cadence.

Verified locally: typecheck:specs 0 errors, tsc --noEmit clean, jest 1261
passed / 123 suites, lint 0 errors, next build OK.
@genwave-radio
genwave-radio merged commit 3ffc61f into main Sep 4, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the chore/jest-family-30.5.1 branch September 4, 2026 15:52
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant