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
{{ message }}
Repository navigation
Commit 7761180
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(@angular/build): default tsConfig option in unit-test builder
The unit-test builder is updated to streamline the initial configuration by intelligently defaulting the `tsConfig` option.
If the `tsConfig` option is not provided in the project's configuration, the builder now checks for the existence of a `tsconfig.spec.json` file in the project's root. If found, it is used automatically. This removes the need for boilerplate `tsConfig` configuration in `angular.json` for the majority of projects.
Additionally, a validation check has been added to ensure that if a `tsConfig` path is specified, the file must exist. An actionable error is thrown if it is not found, preventing downstream build failures.
The builder's schema has been updated to reflect these changes, making the `tsConfig` option optional and documenting the new behavior.
Copy file name to clipboardExpand all lines: packages/angular/build/src/builders/unit-test/schema.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
},
12
12
"tsConfig": {
13
13
"type": "string",
14
-
"description": "The path to the TypeScript configuration file, relative to the workspace root."
14
+
"description": "The path to the TypeScript configuration file, relative to the workspace root. Defaults to `tsconfig.spec.json` in the project root if it exists. If not specified and the default does not exist, the `tsConfig` from the specified `buildTarget` will be used."
0 commit comments