Repository navigation
docs: add Karma and Jasmine to the testing guide - #3856
Open
armando-navarro wants to merge 1 commit into
Open
armando-navarro wants to merge 1 commit into
armando-navarro wants to merge 1 commit into
Conversation
Collaborator
Author
|
This will stay a draft until #3855 merges. At that point I'll rebase this branch on |
Karma with Jasmine was the Angular CLI's test setup before Angular 21. The new section says which of the page's patterns work under Karma as written, gives the one line the fake Auth example needs for Jasmine's types, shows two replacements for a module mock, which Jasmine does not have, and explains why Firebase apps carry over between spec files. The part on moving to Vitest gains a path for Karma projects. Fixes angular#3050
armando-navarro
force-pushed
the
docs-testing-guide-karma
branch
from
December 1, 2026 19:43
00308ce to
ad786a0
Compare
armando-navarro
marked this pull request as ready for review
December 1, 2026 19:43
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.
Checklist
yarn install,yarn testrun successfully? not run (Markdown only)Description
This adds the Karma and Jasmine section that #3855 mentioned would follow. #3050 asks how to mock AngularFire in tests, and its thread has relied on a wrapper-class workaround for Jasmine since 2022.
How I checked it
I pasted every snippet unchanged into apps created with
ng newand ran them in headless Chrome:@angular/build:karmabuilder and with the older@angular-devkit/build-angular:karma"runner": "karma"Then I removed each instruction in turn and confirmed the failure the page describes. For the part on moving to Vitest, I took two of those apps through Angular's migration guide and reran the page's examples.
Fixes #3050