chore(tests): remove orphaned jest-era custom matchers file - #876
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The jest → vitest migration for this repo is already complete (main has no jest config, no jest dependency,
testscript is alreadyvitest run, andvitest.setup.tsitself documents the port). One leftover was never cleaned up:tests/setup/custom-matchers.tsimportedexpectfrom@jest/globals, a package no longer installed. It was never wired intovitest.setup.ts'ssetupFilesand no test imported it, so it was dead code that would only throwMODULE_NOT_FOUNDif 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— cleanvitest runbefore 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