diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 29528973cdb7..4b0ef83f76fc 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -93,7 +93,8 @@ "description": "The unit testing runner to use.", "type": "string", "enum": ["vitest", "karma"], - "default": "vitest" + "default": "vitest", + "x-deprecated": "New projects will only be configured with Vitest in a future version." }, "skipPackageJson": { "type": "boolean", diff --git a/packages/schematics/angular/library/schema.json b/packages/schematics/angular/library/schema.json index 02c6c6f8acaa..18b8bf32c826 100644 --- a/packages/schematics/angular/library/schema.json +++ b/packages/schematics/angular/library/schema.json @@ -58,7 +58,8 @@ "description": "The unit testing runner to use.", "type": "string", "enum": ["vitest", "karma"], - "default": "vitest" + "default": "vitest", + "x-deprecated": "New projects will only be configured with Vitest in a future version." } }, "required": ["name"] diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index 856343e82b8f..0fba89bde3c1 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -51,7 +51,7 @@ export default function (options: NgNewOptions): Rule { routing: options.routing, style: options.style, skipTests: options.skipTests, - testRunner: options.testRunner, + testRunner: options.testRunner === TestRunner.Karma ? TestRunner.Karma : undefined, skipPackageJson: false, // always 'skipInstall' here, so that we do it after the move skipInstall: true, diff --git a/packages/schematics/angular/ng-new/schema.json b/packages/schematics/angular/ng-new/schema.json index 6494b1889d96..b222bee7f792 100644 --- a/packages/schematics/angular/ng-new/schema.json +++ b/packages/schematics/angular/ng-new/schema.json @@ -112,7 +112,8 @@ "description": "The unit testing runner to use.", "type": "string", "enum": ["vitest", "karma"], - "default": "vitest" + "default": "vitest", + "x-deprecated": "New projects will only be configured with Vitest in a future version." }, "createApplication": { "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.",