Skip to content

Commit 462c7a7

Browse files
authored
docs: clarify test builders include and exclude schema descriptions
The schema descriptions for the "include" and "exclude" options in the test builders previously stated that glob patterns were relative to the project root. In practice, test discovery resolves patterns relative to the project source root. This updates the descriptions to accurately reflect that patterns are relative to the project source root.
1 parent 45a7433 commit 462c7a7

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎packages/angular/build/src/builders/karma/schema.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@
182182
"type": "string"
183183
},
184184
"default": ["**/*.spec.ts"],
185-
"description": "Globs of files to include, relative to project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead."
185+
"description": "Globs of files to include, relative to the project source root. \nThere are 2 special cases:\n - when a path to a directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists, it will be included instead."
186186
},
187187
"exclude": {
188188
"type": "array",
189189
"items": {
190190
"type": "string"
191191
},
192192
"default": [],
193-
"description": "Globs of files to exclude, relative to the project root."
193+
"description": "Globs of files to exclude, relative to the project source root."
194194
},
195195
"sourceMap": {
196196
"description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.",

‎packages/angular/build/src/builders/unit-test/schema.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
"type": "string"
4444
},
4545
"default": ["**/*.spec.ts", "**/*.test.ts"],
46-
"description": "Specifies glob patterns of files to include for testing, relative to the project root. This option also has special handling for directory paths (includes all test files within) and file paths (includes the corresponding test file if one exists)."
46+
"description": "Specifies glob patterns of files to include for testing, relative to the project source root. This option also has special handling for directory paths (includes all test files within) and file paths (includes the corresponding test file if one exists)."
4747
},
4848
"exclude": {
4949
"type": "array",
5050
"items": {
5151
"type": "string"
5252
},
53-
"description": "Specifies glob patterns of files to exclude from testing, relative to the project root."
53+
"description": "Specifies glob patterns of files to exclude from testing, relative to the project source root."
5454
},
5555
"filter": {
5656
"type": "string",

‎packages/angular_devkit/build_angular/src/builders/karma/schema.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@
141141
"type": "string"
142142
},
143143
"default": ["**/*.spec.ts"],
144-
"description": "Globs of files to include, relative to project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead."
144+
"description": "Globs of files to include, relative to the project source root. \nThere are 2 special cases:\n - when a path to a directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists, it will be included instead."
145145
},
146146
"exclude": {
147147
"type": "array",
148148
"items": {
149149
"type": "string"
150150
},
151151
"default": [],
152-
"description": "Globs of files to exclude, relative to the project root."
152+
"description": "Globs of files to exclude, relative to the project source root."
153153
},
154154
"sourceMap": {
155155
"description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.",

0 commit comments

Comments
 (0)