Skip to content

Migrate to Jest 30#166

Merged
rubensworks merged 1 commit intomasterfrom
copilot/finish-migration-to-jest-30
Apr 2, 2026
Merged

Migrate to Jest 30#166
rubensworks merged 1 commit intomasterfrom
copilot/finish-migration-to-jest-30

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

Completes the jest 30 upgrade started in #161. Jest 30 removed several deprecated matcher aliases and improved branch coverage detection, requiring both API updates and new test cases.

Dependency updates

  • jest, @types/jest, jest-mock: ^29^30
  • ts-jest unchanged (29.x already declares jest 30 peer support)

Removed deprecated matcher aliases

Jest 30 dropped aliases that were deprecated in jest 27+:

// Before
.toThrowError(/pattern/)
expect(fn).toBeCalledTimes(1)

// After
.toThrow(/pattern/)
expect(fn).toHaveBeenCalledTimes(1)

81 toThrowErrortoThrow replacements across 9 test files; 4 toBeCalledTimestoHaveBeenCalledTimes in ComponentsManagerBuilder-test.ts.

New tests for previously-uncounted branches

Jest 30's coverage engine detects branches that jest 29 missed, causing the 100% branch threshold to fail:

  • ModuleStateBuilder.warn() — the if (this.logger) false-branch was never exercised because no existing test triggered a warn() call without a logger set. Added a buildComponentContexts test with incompatible major versions and no logger.
  • OverrideMapEntry.findProperties() — the if (collectEntries.list) false-branch (direct resource, not an RDF list) was never hit. Added a test that replaces the component's collectEntries property with a bare NamedNode resource.

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 23897264330

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 23896775200: 0.0%
Covered Lines: 1521
Relevant Lines: 1521

💛 - Coveralls

@rubensworks rubensworks marked this pull request as ready for review April 2, 2026 13:21
@rubensworks rubensworks merged commit 8b53b48 into master Apr 2, 2026
28 checks passed
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.

3 participants