You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(@schematics/angular): add warnings and improve Karma config generation
This commit enhances the `config` schematic to provide better guidance and correctness when generating a Karma configuration file.
Changes include:
- The `addKarmaConfig` function now correctly handles projects using the `@angular/build:unit-test` builder.
- When the `unit-test` builder is in use, the schematic checks the `runner` option in both the main `options` and all `configurations` of the `test` target.
- Warnings are issued if the `runner` is not explicitly set to `karma` (defaulting to Vitest) or if it's set to a different runner, informing the user that the generated `karma.conf.js` might not be used.
- Corresponding unit tests have been added to `packages/schematics/angular/config/index_spec.ts` to validate this new warning behavior and ensure correct interaction with the `unit-test` builder.
(cherry picked from commit b5f4192)
0 commit comments