Skip to content

chore(tests): remove orphaned jest-era custom matchers file - #876

Merged
github-actions[bot] merged 1 commit into
mainfrom
chore/remove-orphaned-jest-matchers
Sep 1, 2026
Merged

chore(tests): remove orphaned jest-era custom matchers file#876
github-actions[bot] merged 1 commit into
mainfrom
chore/remove-orphaned-jest-matchers

Conversation

@catomean

@catomean catomean commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

The jest → vitest migration for this repo is already complete (main has no jest config, no jest dependency, test script is already vitest run, and vitest.setup.ts itself documents the port). One leftover was never cleaned up: tests/setup/custom-matchers.ts imported expect from @jest/globals, a package no longer installed. It was never wired into vitest.setup.ts's setupFiles and no test imported it, so it was dead code that would only throw MODULE_NOT_FOUND if ever loaded.

Deleted rather than ported forward, since none of its matchers (toBeValidBitcoinAddress, toBeValidUUID, toBeSanitized, etc.) are referenced by any test — porting it would add new unused surface, not fix something broken.

Verification

  • npx tsc --noEmit — clean
  • Full local vitest run before this change: 279/279 test files, 2631/2631 tests passing (3 unrelated worker-pool startup timeouts observed locally under heavy concurrent load on this machine — not test failures, and not present in a normal run)

Test plan

  • Confirmed no remaining references to the deleted file
  • Typecheck passes
  • Will watch this PR's real CI to completion before merging

The jest -> vitest migration already completed in an earlier PR (see
vitest.setup.ts's own header: "Ported from jest.setup.ts when the
runner moved from jest 30 + ts-jest (CJS) to Vitest"). One file was
never cleaned up: tests/setup/custom-matchers.ts imported `expect`
from `@jest/globals`, a package that is not even installed anymore
(confirmed: not in package.json, not in node_modules). It also was
never wired into vitest.setup.ts's setupFiles and no test imported it
directly, so it was fully dead -- it would only ever have thrown
MODULE_NOT_FOUND if something had tried to load it.

Deleted rather than ported: none of its matchers
(toBeValidBitcoinAddress, toBeValidUUID, toBeSanitized, etc.) are
referenced by any test, so porting it forward would be adding new,
unused surface rather than fixing something broken.

Full local vitest run confirms this repo's test suite was already
green before this change: 279/279 test files, 2631/2631 tests passing.
@github-actions
github-actions Bot merged commit b3eae6e into main Sep 1, 2026
6 checks passed
@github-actions
github-actions Bot deleted the chore/remove-orphaned-jest-matchers branch September 1, 2026 13:17
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.

1 participant