Migrate Jasmine matchers to Vitest
ProprietaryRewrites the Jasmine matchers Vitest does not share: toBeTrue() and toBeFalse() become toBe(true) and toBe(false), toHaveSize becomes toHaveLength, jasmine.any and the other asymmetric matchers move to expect, expectAsync(...) becomes expect(...).resolves or .rejects, withContext(msg) becomes expect(actual, msg), toHaveBeenCalledOnceWith becomes toHaveBeenCalledTimes(1) and toHaveBeenCalledWith, and toHaveClass, toBeNullish and toHaveBeenCalledBefore become plain assertions. A matcher Vitest has no equivalent for is left with a TODO: vitest-migration comment, as the Angular CLI's refactor-jasmine-vitest schematic does.
org. openrewrite. angular. migration. migrate-jasmine-matchers-to-vitestOptional
Whether the tests run in Vitest's browser mode, which has a toHaveClass matcher of its own. When they do, toHaveClass is left as it is.
mod run . --recipe= org. openrewrite. angular. migration. migrate-jasmine-matchers-to-vitestInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.