Skip to content

Commit 5b0afb3

Browse files
authored
fix(@schematics/angular): correct tsconfig.spec.json include for spec files
Updates the files in both application and library schematics to specifically include instead of . This ensures that only test specification files are processed for testing, preventing unintended inclusion of other TypeScript files.
1 parent 0aab115 commit 5b0afb3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
]
1010
},
1111
"include": [
12-
"src/**/*.ts"
12+
"src/**/*.d.ts",
13+
"src/**/*<% if (standalone) { %>.spec<% } %>.ts"
1314
]
1415
}

packages/schematics/angular/library/files/tsconfig.spec.json.template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
]
1010
},
1111
"include": [
12-
"src/**/*.ts"
12+
"src/**/*.d.ts",
13+
"src/**/*<% if (standalone) { %>.spec<% } %>.ts"
1314
]
1415
}

0 commit comments

Comments
 (0)