I've had karma test spec files outside the src folder in a test folder on the root level of the project. After updating angular from 14 to 15, karma needs the test spec files to be in whatever folder the sourceRoot says in the angular.json file.
// angular.json
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"project-name": {
"root": "",
"sourceRoot": "", // <<===
Is there a way to tell karma to look at the workspace root level for test downwards without changing the sourceRoot attribute in angular.json?
I changed the sourceRoot path to "" and then Karma finds the tests as long as they're in the workspace folder and down, since i'm looking for tests with **/*.spec.ts in the
// tsconfig.spec.json
"include": [
"**/*.spec.ts",
"**/*.d.ts",
]