Skip to content

fix: Vitest migration follow-ups (no-any, type imports, snapshot prune, docs)#213

Merged
JohannesHoppe merged 1 commit into
mainfrom
fix/vitest-migration-followups
Jun 9, 2026
Merged

fix: Vitest migration follow-ups (no-any, type imports, snapshot prune, docs)#213
JohannesHoppe merged 1 commit into
mainfrom
fix/vitest-migration-followups

Conversation

@JohannesHoppe

@JohannesHoppe JohannesHoppe commented Jun 9, 2026

Copy link
Copy Markdown
Member

Small, non-behavioral cleanups after the Jest → Vitest migration (#210).

Changes

# Fix File(s)
1 Revert production anyunknown on beforeAdd's param (project's No-any rule) src/interfaces.ts
2 Add missing import { Mock / MockInstance } from 'vitest' — 5 specs used the types without importing them. Not provided by vitest/globals, so they were tsc/editor errors (runtime was fine; specs aren't typechecked in CI). engine.spec.ts, engine.gh-pages-integration.spec.ts, ng-add.spec.ts, parameter-tests/builder-integration.spec.ts, test-fixtures/angular-versions.spec.ts
3 types: ["vitest/globals", "node"] so specs keep Node ambient types (process, Buffer, …) src/tsconfig.json
4 Prune 2 obsolete jest-format snapshots left behind by the migration (vitest reported them; vitest run -u removed them — values unchanged) src/__snapshots__/ng-add.spec.ts.snap
5 Drop an unnecessary as any src/parameter-tests/builder-integration.spec.ts
6 Restore the "implicitly tested by test.options.bool.no.spec.ts" note (lost with the empty describe, which vitest rejects) src/commander-fork/test/test.fork-fixes.spec.ts
7 Add "Supporting a new Angular version" to the contributor README TOC docs/README_contributors.md

Small, non-behavioral cleanups after the Jest→Vitest migration:

- interfaces.ts: revert beforeAdd param `any` → `unknown` (project No-any rule)
- add missing vitest type imports (Mock / MockInstance) to 5 specs that used
  the types without importing them — they aren't provided by vitest/globals,
  so this fixes editor/tsc errors (runtime was unaffected; specs aren't
  typechecked in CI)
- tsconfig.json: types ["vitest/globals", "node"] so specs keep Node ambient
  types (process, Buffer, …)
- prune 2 obsolete jest-format snapshots left behind in ng-add.spec.ts.snap
- builder-integration.spec.ts: drop an unnecessary `as any`
- test.fork-fixes.spec.ts: restore the "implicitly tested by
  test.options.bool.no.spec.ts" note (lost with its empty describe, which
  vitest rejects)
- docs: add "Supporting a new Angular version" to the contributor README TOC

Build clean, all 430 tests green, no obsolete snapshots.
@JohannesHoppe

Copy link
Copy Markdown
Member Author

FYI @d-koppenhagen , thanks a lot! =)

@JohannesHoppe JohannesHoppe merged commit 89a7a77 into main Jun 9, 2026
2 checks passed
@JohannesHoppe JohannesHoppe deleted the fix/vitest-migration-followups branch June 9, 2026 10:26
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