Skip to content

Commit 78e9ee2

Browse files
committed
fix(@schematics/angular): accept the project as a positional argument in refactor-jasmine-vitest
The karma-to-vitest migration suggests running `ng g @schematics/angular:refactor-jasmine-vitest <project_name>`, but the schematic only accepts the project through the `--project` option, so the suggested command fails with `Unknown argument`. Read the project from the first positional argument. When it is not provided, the schematic still uses the only project of the workspace.
1 parent bf1602a commit 78e9ee2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • packages/schematics/angular/refactor/jasmine-vitest

‎packages/schematics/angular/refactor/jasmine-vitest/schema.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
},
1717
"project": {
1818
"type": "string",
19-
"description": "The name of the project where the tests should be refactored. If not specified, the CLI will determine the project from the current directory.",
19+
"description": "The name of the project where the tests should be refactored. If not specified, the only project of the workspace is used.",
2020
"$default": {
21-
"$source": "projectName"
21+
"$source": "argv",
22+
"index": 0
2223
}
2324
},
2425
"verbose": {

0 commit comments

Comments
 (0)