I looked more at the angular.json file in the working new Angular 15 application. I had to do 2 things:

  1. remove the "main"
  2. change the "polyfills"

Changed from:

   "options": {
     "main": "src/test.ts",
     "polyfills": "src/polyfills.ts",
     "tsConfig": "tsconfig.spec.json",

Changed to:

   "options": {
     "polyfills": [
       "zone.js",
       "zone.js/testing"
     ],
     "tsConfig": "tsconfig.spec.json",
Answer from Phil Huhn on Stack Overflow
🌐
GitHub
github.com › angular › angular-cli › issues › 25885
Karma/Jasmine tests don't run after upgrading from Angular 14 to 15 · Issue #25885 · angular/angular-cli
September 21, 2023 - After upgrading from Angular 14 to Angular 15, my Karma unit tests don't run anymore.
Author   ilyakonrad
🌐
npm
npmjs.com › package › karma-jasmine
karma-jasmine - npm
June 16, 2022 - Latest version: 5.1.0, last published: 4 years ago. Start using karma-jasmine in your project by running `npm i karma-jasmine`. There are 484 other projects in the npm registry using karma-jasmine.
      » npm install karma-jasmine
    
Published   Jun 16, 2022
Version   5.1.0
Discussions

Will Karma be updated for future versions of Angular and Jasmine?
I tried updating our companies Angular module, with that comes the required dependencies update. So I went to all the newest versions. Which included jasmine-core 5.0.0. This broke our Jasmine-karm... More on stackoverflow.com
🌐 stackoverflow.com
Should we upgrade Jasmine and Karma related dependencies too during Angular upgrade? - Stack Overflow
Also check if the correct versions are set for karma and jasmine below is a stackblitz of a new project using angular 15, the versions should match, if you have a different version of angular 15, then first do npm i -g @angular/cli@<> then do ng new test, then check the versions of ... More on stackoverflow.com
🌐 stackoverflow.com
Updating the version of Jasmine used in karma-jasmine - Stack Overflow
Questions How can I update the version of Jasmine used when running Jasmine via Karma using the karma-jasmine plugin? Will Jasmine only get updated whenever the karma-jasmine plugin integrates a n... More on stackoverflow.com
🌐 stackoverflow.com
google chrome - Angular karma can't capture browser after updating angular 9 to 10 - Stack Overflow
I followed the guide on the angular update giude to update my project from version 9 to 10. My project and my karma tests ran perfectly fine with angular 9. The update changed the TypeScript versio... More on stackoverflow.com
🌐 stackoverflow.com
🌐
npm
npmjs.com › package › karma
karma - npm
July 29, 2024 - For those outside Angular looking to migrate off Karma, both Web Test Runner and jasmine-browser-runner provide browser-based unit testing solutions which can be used as a direct alternative.
      » npm install karma
    
Published   Jul 29, 2024
Version   6.4.4
🌐
Medium
medium.com › knowledge-pills › implementing-karma-and-jasmine-testing-framework-in-an-angular-project-a9f25ea7c669
Implementing Karma and Jasmine Testing Framework in an Angular Project | by Fuji Nguyen | Knowledge Pills | Medium
March 23, 2023 - For example, if you want to use Jasmine as your testing framework, you can install it using the command npm install karma-jasmine --save-dev. Create Karma Configuration File: Create a Karma configuration file by running the command ...
Find elsewhere
🌐
DEV Community
dev.to › moncapitaine › steps-to-use-testing-library-in-angular-15-2i1k
How to use testing-library in Angular 15 - DEV Community
April 6, 2023 - The included karma/jasmine tests do not follow modern testing-principles like role selectors. Therefore I recommend removing these tests and replace them with the more useful testing-library approach.
🌐
Stack Overflow
stackoverflow.com › questions › 66173553 › angular-karma-cant-capture-browser-after-updating-angular-9-to-10
google chrome - Angular karma can't capture browser after updating angular 9 to 10 - Stack Overflow
"devDependencies": { "@angular-devkit/build-angular": "~0.1002.1", "@angular/cli": "10.2.1", "@angular/compiler-cli": "10.2.4", "@angular/language-service": "10.2.4", "@compodoc/compodoc": "1.1.10", "@types/jasmine": "3.3.13", "@types/jasminewd2": "2.0.6", "@types/node": "^12.11.1", "codelyzer": "^5.1.2", "gulp": "4.0.2", "gulp-install": "1.1.0", "gulp-typedoc": "2.2.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", "karma-chrome-launcher": "~3.1.0", "karma-cli": "2.0.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-ie-launcher": "1.0.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "karma-remap-istanbul": "0.6.0", "karma-sourcemap-loader": "0.3.7", "karma-spec-reporter": "0.0.32", "protractor": "~7.0.0", "puppeteer": "1.20.0", "ts-node": "8.3.0", "tslint": "~6.1.0", "typedoc": "0.14.2", "typescript": "4.0.5" },
🌐
Angular
angular.dev › guide › testing › karma
Testing with Karma and Jasmine • Angular
While Vitest is the default test runner for new Angular projects, Karma is still a supported and widely used test runner. This guide provides instructions for testing your Angular application using the Karma test runner with the Jasmine testing framework.
🌐
CodeCraft
codecraft.tv › courses › angular › unit-testing › jasmine-and-karma
Jasmine & Karma • Angular - CodeCraft
We can run Jasmine tests in a browser ourselves by setting up and loading a HTML file, but more commonly we use a command-line tool called Karma. Karma handles the process of creating HTML files, opening browsers and running tests and returning the results of those tests to the command line. If you use the Angular CLI to manage projects it automatically creates stub Jasmine spec files for you when generating code.
🌐
Stack Overflow
stackoverflow.com › questions › 44099264 › karma-jasmine-setup-for-angular-project
Karma-Jasmine setup for Angular project - javascript
Error.stackTraceLimit = Infinity; require('core-js/es6'); require('core-js/es7/reflect'); require('zone.js/dist/zone'); require('zone.js/dist/long-stack-trace-zone'); require('zone.js/dist/proxy'); // since zone.js 0.6.15 require('zone.js/dist/sync-test'); require('zone.js/dist/jasmine-patch'); // put here since zone.js 0.6.14 require('zone.js/dist/async-test'); require('zone.js/dist/fake-async-test'); require('rxjs/Rx'); var testing = require('@angular/core/testing'); var browser = require('@angular/platform-browser-dynamic/testing'); testing.TestBed.initTestEnvironment( browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting() ); var testContext = require.context('../src', true, /\.spec\.ts/); function requireAll(requireContext) { return requireContext.keys().map(requireContext); } var modules = requireAll(testContext);
🌐
Zymr
zymr.com › home › blog › angular unit testing with karma and jasmine
Angular Unit Testing With Karma And Jasmine
July 22, 2024 - This blog helps you get started with Angular unit testing leveraging Karma and Jasmine.
🌐
LambdaTest
lambdatest.com › home › blog › angular testing with jasmine and karma using selenium [tutorial]
Angular Testing With Jasmine And Karma Using Selenium [Tutorial]
November 10, 2025 - Enable Continuous Testing: Karma automatically reruns tests whenever code changes. Keep ng test running in watch mode to maintain quick feedback during development. ... Jasmine is the default testing framework for Angular applications.
🌐
esketchers
esketchers.com › angular-unit-testing-using-jasmine-and-karma
Angular Unit Testing Using Jasmine and Karma
April 17, 2023 - This Angular unit testing tutorial with examples covers how to test a service & a component Using Jasmine and Karma.
🌐
DEV Community
dev.to › this-is-angular › angular-testing-in-2023-past-present-and-future-j5m
Angular Testing in 2023 - Past, Present, and Future - DEV Community
July 3, 2023 - Because frankly I just started with this Jamine/Karma unit testing and was happy enough to get it running in the first place. :-( I do not have to dump the tests I have made with such effort into the dustbin? ... Rainer is a passionate software developer and loves to work with Angular and Spring. He is a trainer and consultant at AngularArchitects.io and runs ng-news, a weekly Angular newsletter. ... Yes, you can continue to write Jasmine tests and in some future version Angular will just switch the runner.