Skip to content

Commit 5bfcd66

Browse files
committed
refactor(@schematics/angular): deprecate testRunner option
DEPRECATED: The `testRunner` option in the `application`, `library`, and `ng-new` schematics is deprecated. New projects will only be configured with Vitest in a future version.
1 parent 2170cff commit 5bfcd66

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎packages/schematics/angular/application/schema.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@
9393
"description": "The unit testing runner to use.",
9494
"type": "string",
9595
"enum": ["vitest", "karma"],
96-
"default": "vitest"
96+
"default": "vitest",
97+
"x-deprecated": "New projects will only be configured with Vitest in a future version."
9798
},
9899
"skipPackageJson": {
99100
"type": "boolean",

‎packages/schematics/angular/library/schema.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
"description": "The unit testing runner to use.",
5959
"type": "string",
6060
"enum": ["vitest", "karma"],
61-
"default": "vitest"
61+
"default": "vitest",
62+
"x-deprecated": "New projects will only be configured with Vitest in a future version."
6263
}
6364
},
6465
"required": ["name"]

‎packages/schematics/angular/ng-new/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function (options: NgNewOptions): Rule {
5151
routing: options.routing,
5252
style: options.style,
5353
skipTests: options.skipTests,
54-
testRunner: options.testRunner,
54+
testRunner: options.testRunner === TestRunner.Karma ? TestRunner.Karma : undefined,
5555
skipPackageJson: false,
5656
// always 'skipInstall' here, so that we do it after the move
5757
skipInstall: true,

‎packages/schematics/angular/ng-new/schema.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
"description": "The unit testing runner to use.",
113113
"type": "string",
114114
"enum": ["vitest", "karma"],
115-
"default": "vitest"
115+
"default": "vitest",
116+
"x-deprecated": "New projects will only be configured with Vitest in a future version."
116117
},
117118
"createApplication": {
118119
"description": "Create a new initial application project in the new workspace. When false, creates an empty workspace with no initial application. You can then use the `ng generate application` command to create applications in the `projects` directory.",

0 commit comments

Comments
 (0)