Skip to content

chore(deps-dev): bump the jest group across 1 directory with 4 updates#5341

Merged
rtibbles merged 2 commits intounstablefrom
dependabot/npm_and_yarn/jest-1ecd9637f0
Apr 15, 2026
Merged

chore(deps-dev): bump the jest group across 1 directory with 4 updates#5341
rtibbles merged 2 commits intounstablefrom
dependabot/npm_and_yarn/jest-1ecd9637f0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Aug 27, 2025

Bumps the jest group with 4 updates in the / directory: jest, jest-cli, jest-each and jest-environment-jsdom.

Updates jest from 29.7.0 to 30.1.1

Release notes

Sourced from jest's releases.

30.1.1

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

Jest 30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

... (truncated)

Changelog

Sourced from jest's changelog.

30.1.1

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.5

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.4

Features

  • [expect] The Inverse type is now exported (#15714)
  • [expect] feat: support async functions in toBe (#15704)

Fixes

  • [jest] jest --onlyFailures --listTests now correctly lists only failed tests (#15700)
  • [jest-snapshot] Handle line endings in snapshots (#15708)

30.0.3

... (truncated)

Commits

Updates jest-cli from 29.7.0 to 30.1.1

Release notes

Sourced from jest-cli's releases.

30.1.1

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

Jest 30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

... (truncated)

Changelog

Sourced from jest-cli's changelog.

30.1.1

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.5

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.4

Features

  • [expect] The Inverse type is now exported (#15714)
  • [expect] feat: support async functions in toBe (#15704)

Fixes

  • [jest] jest --onlyFailures --listTests now correctly lists only failed tests (#15700)
  • [jest-snapshot] Handle line endings in snapshots (#15708)

30.0.3

... (truncated)

Commits

Updates jest-each from 30.0.5 to 30.1.0

Release notes

Sourced from jest-each's releases.

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)
Changelog

Sourced from jest-each's changelog.

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)
Commits

Updates jest-environment-jsdom from 29.7.0 to 30.1.1

Release notes

Sourced from jest-environment-jsdom's releases.

30.1.1

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.2

What's Changed

Fixes

  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#15689)
  • [jest-util] Make garbage collection protection property writable (#15689)

Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md

Jest 30.0.1

What's Changed

Features

  • [jest-resolver] Implement the defaultAsyncResolver (#15679)

Fixes

  • [jest-resolver] Resolve builtin modules correctly (#15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#15684)

Chore & Maintenance

  • [*] Remove and deprecate jest-repl package (#15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#15685)

... (truncated)

Changelog

Sourced from jest-environment-jsdom's changelog.

30.1.1

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)

30.1.0

Features

  • [jest-leak-detector] Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)
  • [jest-runtime] Reduce redundant ReferenceError messages
  • [jest-core] Include test modules that failed to load when --onlyFailures is active

Fixes

  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
  • [jest-circus] Fix it.concurrent not working with describe.skip (#15765)
  • [jest-snapshot] Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings
  • [jest-runtime] Importing from @jest/globals in more than one file no longer breaks relative paths (#15772)

Chore

  • [expect] Update docblock for toContain() to display info on substring check (#15789)

30.0.5

Features

  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes

Fixes

  • [expect] Fix bigint error (#15702)

30.0.4

Features

  • [expect] The Inverse type is now exported (#15714)
  • [expect] feat: support async functions in toBe (#15704)

Fixes

  • [jest] jest --onlyFailures --listTests now correctly lists only failed tests (#15700)
  • [jest-snapshot] Handle line endings in snapshots (#15708)

30.0.3

... (truncated)

Commits

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Aug 27, 2025
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch from 1b52632 to ca23232 Compare September 3, 2025 19:07
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch from ca23232 to d1b2768 Compare September 10, 2025 00:02
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch 2 times, most recently from ea3e481 to f2eaea0 Compare September 24, 2025 00:02
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch from f2eaea0 to efb9b59 Compare October 1, 2025 00:02
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch 2 times, most recently from 42794bb to 30c7dc2 Compare October 15, 2025 00:02
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch from 30c7dc2 to 5ae0b86 Compare October 22, 2025 00:02
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch from 5ae0b86 to 36a49ee Compare October 29, 2025 00:02
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch from 36a49ee to 665242a Compare November 5, 2025 00:05
@nucleogenesis nucleogenesis force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch from 1cf9ed1 to 27f80f3 Compare December 9, 2025 21:26
expect(
() => new Change({ key: '1', table: TABLE_NAMES.CONTENTNODE, type: CHANGE_TYPES.CREATED }),
).toThrow(new ReferenceError('source should be a string, but undefined was passed instead'));
).toThrow(new TypeError('source should be a string, but undefined was passed instead'));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So this is weird so I wonder if jest was a bit loosey-goosey with the type of error it got when checking things out here.

It was two years ago that the errors here were defined and the tests error types were flip-flopped but only now did they fail apparently.

@nucleogenesis
Copy link
Copy Markdown
Member

nucleogenesis commented Dec 11, 2025

I've gotten all but one test passing on this PR - seems like something has changed w/ regards to mocking and overriding window.location and it's bits and parts. So after trying everything I could think of and then watching Claude try everything I could think of and then some more things I didn't think of... it seems clear that the code just shouldn't rely on calling window.location.assign directly (or the test should test the behavior in a way that doesn't mock window.location.

In AccountsMain we used window.location.assign to change the URL so I started reworking it to use the Vue Router there - will need some non-me testing there once this is ready so I'll reach out for another reviewer when I have the tests passing to be sure that there wasn't some particular reason to avoid the router when this was written?


// Create a spy for navigate before rendering
const navigateSpy = jest.fn();
const OriginalAccountsMain = AccountsMain;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is the witchcraft that Claude came up with to accommodate the need to use the path in the next parameter to redirect.

I tried doing it w/ Vue Router and ran into redundant navigation errors. I tried mocking window.location all sorts of different ways but always ended up running into the issue of it being read-only.

I kind of hate everything about this because it feels like it should be done differently if this is how the tests have to be written, but my attempts to do it differently fizzled out in annoying ways where when I got it working in the browser, tests failed and vice versa until I asked Claude a second time to "figure it out please" and let them run with it.

It works and tests pass now anyway

Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

Dependency Update Review — Stale Branch

Packages: jest, jest-cli, jest-each, jest-environment-jsdom (grouped)
Version: 29.7.0 → 30.1.1
Semver risk: Major
Dependency type: devDependency
CI status: "All file linting" and "CodeQL" failing; Frontend tests passing
Branch status: CONFLICTING — cannot merge in current state

Preliminary Analysis

This is a major version bump of the Jest test framework group. Jest 30 includes breaking changes:

  • Renamed assertion methods (toBeCalledtoHaveBeenCalled, toThrowErrortoThrow)
  • Changes to window.location mocking behavior in jsdom environment
  • Various other API changes

@nucleogenesis has done significant work here (8 commits) adapting tests to Jest 30's breaking changes, including reworking AccountsMain to use Vue Router instead of window.location.assign for better testability.

Why This Review Cannot Proceed

The branch is conflicting and over 6 months old (created 2025-08-27). The lockfile may not reflect the current dependency tree, and CI results are unreliable against the current state of unstable.

Recommendation

A rebase is needed before this can be fully reviewed. A maintainer with push access should run @dependabot rebase — though given the extensive manual commits on this branch, a manual rebase against unstable is likely required instead.

After rebasing:

  1. Verify the "All file linting" and "CodeQL" failures are not caused by the Jest upgrade
  2. Confirm all frontend tests still pass
  3. Re-request review

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Reviewed the pull request diff checking for:

  • Correctness: bugs, edge cases, undocumented behavior, resource leaks, hardcoded values
  • Design: unnecessary complexity, naming, readability, comment accuracy, redundant state
  • Architecture: duplicated concerns, minimal interfaces, composition over inheritance
  • Testing: behavior-based assertions, mocks only at hard boundaries, accurate coverage
  • Completeness: missing dependencies, unupdated usages, i18n, accessibility, security
  • Principles: DRY (same reason to change), SRP, Rule of Three (no premature abstraction)
  • Checked CI status and linked issue acceptance criteria
  • For UI changes: inspected screenshots for layout, visual completeness, and consistency

@rtibbles rtibbles assigned rtibbles and unassigned nucleogenesis Apr 10, 2026
@rtibbles
Copy link
Copy Markdown
Member

@dependabot recreate

Dependabot couldn't find the original pull request head commit, 665242a.
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/jest-1ecd9637f0 branch from 21cafae to 0b2a220 Compare April 10, 2026 16:06
Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

Prior findings

Resolved:

  • Branch was CONFLICTING/stale (blocking) — resolved by @dependabot recreate, branch is now current

Unaddressed (re-raised below):

  • Jest 30 breaking changes require test migrations before this can merge (blocking) — these were partially addressed by @nucleogenesis in 8 prior commits, but all migration work was lost when the branch was recreated

1/2 prior findings resolved.


Dependency Update Review

Packages: jest, jest-cli, jest-each, jest-environment-jsdom (grouped)
Version: 29.7.0 → 30.1.1
Semver risk: Major
Dependency type: devDependency
CI status: FAILING — 44 frontend tests failing across 10 files

Changelog Analysis

Jest 30 is a major version with breaking changes that directly affect this codebase:

Breaking changes confirmed by CI failures:

  • Deprecated assertion aliases removed: toBeCalled, not.toBeCalled, toBeCalledTimes, toBeCalledWith, toThrowError are no longer available — use their canonical forms (toHaveBeenCalled, toHaveBeenCalledTimes, toHaveBeenCalledWith, toThrow)
  • jsdom v26 window.location behavior change: Setting window.location or calling window.location.assign in test contexts now throws TypeError: 'toString' called on an object that is not a valid instance of Location — the old mocking pattern is no longer supported

Compatibility Assessment

  • Project uses removed assertion aliases: yes (toBeCalled, toBeCalledWith, toBeCalledTimes, toThrowError in multiple test files)
  • window.location.assign mocked directly in tests: yes (AccountsMain and channel list tests)
  • Code changes required: yes — test migrations are needed across 10 files
  • Prior migration work exists: yes, but lost@nucleogenesis completed most of this in the previous branch iteration; @dependabot recreate reset the branch, removing those commits

Failing Tests

44 failures across 10 files:

File Failure type Count
shared/utils/validation.spec.js toThrowError not a function 3
shared/data/__tests__/changes.spec.js toThrowError / toBeCalled variants ~4
shared/data/__tests__/ContentNodeResource.spec.js multiple (DOM + API) ~8
shared/__tests__/feedbackUtils.spec.js likely assertion aliases ~4
channelEdit/components/AssessmentEditor/AssessmentEditor.spec.js toBeCalled variants ~8
channelList/views/Channel/__tests__/catalogList.spec.js window.location navigation 1
channelList/…/StudioStarredChannels/…spec.js window.location navigation 1
channelList/…/StudioMyChannels/…spec.js window.location navigation 1
channelList/…/StudioViewOnlyChannels/…spec.js window.location navigation 1
accounts/pages/__tests__/accountsMain.spec.js window.location assignment in jsdom v26 8

Straightforward fixes (assertion alias renames): For toThrowErrortoThrow, toBeCalledtoHaveBeenCalled, etc., these are mechanical renames. Example:

// Before
expect(() => isNodeComplete({ nodeDetails: undefined })).toThrowError(error);
expect(mockFn).toBeCalled();
expect(mockFn).toBeCalledWith(arg);
// After
expect(() => isNodeComplete({ nodeDetails: undefined })).toThrow(error);
expect(mockFn).toHaveBeenCalled();
expect(mockFn).toHaveBeenCalledWith(arg);

Harder fix (AccountsMain + channel list window.location): As @nucleogenesis noted in their Dec 2025 comment, jsdom v26 no longer allows mocking window.location.assign. The test or the component code needs to change so that navigation doesn't rely on directly calling window.location.assign. Options:

  1. Replace window.location.assign(url) in the component with a Vue Router $router.push() call (the approach @nucleogenesis was pursuing)
  2. Use Object.defineProperty(window, 'location', {...}) in a beforeEach to swap the entire location object (not recommended — fragile in jsdom v26)
  3. Restructure tests to assert router calls rather than window.location changes

Recommendation

REQUEST_CHANGES — 44 frontend test failures prevent merge. The most efficient path forward is to restore the migration commits from the previous branch iteration (the nucleogenesis commits that were visible before the recreate) rather than redoing the work from scratch, if those commits are still available in git history.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

Jest 30 removed deprecated matcher aliases (toThrowError, toBeCalled,
toBeCalledWith, toBeCalledTimes) and changed how toThrow compares error
objects. jsdom 26 makes window.location non-configurable per the HTML
spec, breaking the common delete-and-replace mocking pattern.

- Replace removed matcher aliases with canonical names
- Use string messages instead of error objects in toThrow assertions
- Extract window.location.assign into shared/utils/navigation module
  so tests can jest.mock it instead of fighting jsdom's unforgeable
  Location properties

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rtibbles rtibbles merged commit 0e9ce29 into unstable Apr 15, 2026
17 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/jest-1ecd9637f0 branch April 15, 2026 00:27
Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

The blocking finding from the previous review is fully resolved. CI all passing.

Prior findings

N prior findings unchanged (1 resolved, 0 acknowledged — from round 1).

Newly resolved:

  • Jest 30 breaking changes + 44 frontend test failures (blocking) ← was UNADDRESSED — resolved by 8bc7f56d7: assertion aliases migrated (toThrowErrortoThrow, toBeCalled*toHaveBeenCalled*) and window.location.assign refactored via redirectBrowser wrapper

2/2 prior findings resolved.


Dependency Update Review

Packages: jest, jest-cli, jest-each, jest-environment-jsdom (grouped)
Version: 29.7.0 → 30.1.1 (30.3.0 resolved in lockfile)
Semver risk: Major
Dependency type: devDependency
CI status: All passing

Compatibility Assessment

All migration work is in place. The redirectBrowser wrapper cleanly resolves the jsdom v26 window.location testing constraint. Assertion alias renames are correct. No further code changes required.

Changelog Analysis

Previous review covered the Jest 30 changelog in full — no new versions to assess.

Visual Inspection

Vue files changed only for window.location.assign(url)redirectBrowser(url) substitution. The wrapper delegates to the same call; zero visual change possible.

Recommendation

APPROVE — migration complete, CI passing, no blocking issues.

  • suggestion (inline on AccountsMain.vue:180): GitHub Advanced Security flagged open redirect and XSS on this.nextParam usage — pre-existing, not introduced by this PR, but now explicitly surfaced by CodeQL on the changed line. Worth tracking.
  • nitpick (inline on changes.spec.js:342): Error type no longer asserted.
  • praise (inline on navigation.js:7): Clean wrapper design.

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

* Extracted so tests can mock this module instead of fighting
* jsdom's non-configurable window.location properties.
*/
export function redirectBrowser(url) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

praise: Clean, well-documented wrapper for testability — extracting the module boundary lets tests mock the navigation call without fighting jsdom's non-configurable window.location. Consistent pattern applied across all four calling components.

this.loginFailedOffline = false;
this.loginFailed = false;
window.location.assign(this.nextParam || window.Urls.channels());
redirectBrowser(this.nextParam || window.Urls.channels());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: GitHub Advanced Security flagged this line for open redirect (CVE risk: this.nextParam comes from ?next=<user-supplied URL> and is passed directly to window.location.assign with no origin validation). This was pre-existing before this PR — the refactor to redirectBrowser didn't introduce or worsen it — but CodeQL is now surfacing it explicitly on the changed line. Worth opening a follow-up issue to validate nextParam is a same-origin path before redirecting.

type: CHANGE_TYPES.CREATED,
}),
).toThrow(new TypeError('key is required for a Change but it was undefined'));
).toThrow('key is required for a Change but it was undefined');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick: Switching from toThrow(new TypeError('msg')) to toThrow('msg') drops the error-type assertion — a ReferenceError with the same message would now pass. The nucleogenesis comment on this file suggests the original error types may have been uncertain anyway, so this is a reasonable trade-off for Jest 30 compatibility; just noting the slight weakening in case the specific error types are meaningful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants