Skip to content

Conversation

@alan-agius4
Copy link
Collaborator

This commit introduces the testRunner option to the library schematic, allowing users to explicitly select between vitest and karma as their test runner. Additionally, the ng-new schematic has been updated to configure the default testRunner for libraries in angular.json based on the workspace creation options.

Closes #31887

@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Nov 20, 2025
@alan-agius4 alan-agius4 requested a review from clydin November 20, 2025 15:17
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 20, 2025
This commit introduces the `testRunner` option to the library schematic, allowing users to explicitly select between `vitest` and `karma` as their test runner.
Additionally, the `ng-new` schematic has been updated to configure the default `testRunner` for libraries in `angular.json` based on the workspace creation options.

Closes angular#31887
…pping

This commit simplifies the `getTestRunnerDependencies` implementation and renames it to `addTestRunnerDependencies`.
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 20, 2025
@alan-agius4 alan-agius4 merged commit e288076 into angular:main Nov 20, 2025
35 checks passed
@alan-agius4 alan-agius4 deleted the schematics-vitest branch November 20, 2025 17:52
@alan-agius4
Copy link
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ng g lib in empty workspace scaffolds old Karma/Jasmine test runner instead of Vitest

2 participants