Skip to content

Commit c854a71

Browse files
committed
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. (cherry picked from commit 5b0afb3)
1 parent b3908f6 commit c854a71

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)