fix: Vitest migration follow-ups (no-any, type imports, snapshot prune, docs)#213
Merged
Merged
Conversation
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.
Member
Author
|
FYI @d-koppenhagen , thanks a lot! =) |
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.
Small, non-behavioral cleanups after the Jest → Vitest migration (#210).
Changes
any→unknownonbeforeAdd's param (project's No-anyrule)src/interfaces.tsimport { Mock / MockInstance } from 'vitest'— 5 specs used the types without importing them. Not provided byvitest/globals, so they weretsc/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.tstypes: ["vitest/globals", "node"]so specs keep Node ambient types (process,Buffer, …)src/tsconfig.jsonvitest run -uremoved them — values unchanged)src/__snapshots__/ng-add.spec.ts.snapas anysrc/parameter-tests/builder-integration.spec.tstest.options.bool.no.spec.ts" note (lost with the emptydescribe, which vitest rejects)src/commander-fork/test/test.fork-fixes.spec.tsdocs/README_contributors.md