At most one unit test framework
Why it matters
Running Jest and Vitest in the same repo doubles CI runtime because every pipeline executes both runners to cover both test sets. Coverage reports fragment across two tools and merge incorrectly, snapshot formats differ enough to produce false diffs when someone runs the wrong runner, and global setup files (mocks, polyfills, fetch shims) must be duplicated in two configs. Test authors pick whichever syntax they remember, and the suite's actual coverage is impossible to measure accurately.
Severity rationale
Medium because the primary impact is CI time and coverage-report unreliability rather than production correctness.
Remediation
Pick Vitest for new projects (Jest-compatible API, faster, ESM-native) or stay on Jest if you have heavy jest.mock usage. Migrate config, then convert mocks:
# Replace jest.config.js with vitest.config.ts
# Global sed over test files:
# jest.fn() -> vi.fn()
# jest.mock() -> vi.mock()
npm uninstall jest @types/jest ts-jest babel-jest
Update package.json test scripts and remove Jest-specific setup files from src/__tests__/setup/.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Multi-Session Drift Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-slop-code-drift·automated