Skip to content

Commit c0b6a5d

Browse files
Patil2099alan-agius4
authored andcommitted
fix(@schematics/angular): don't add skipTest option to module schematic options
Closes ##20811 (cherry picked from commit 36b5040)
1 parent b36a35d commit c0b6a5d

File tree

1 file changed

+8
-15
lines changed
  • packages/schematics/angular/application

1 file changed

+8
-15
lines changed

packages/schematics/angular/application/index.ts

+8-15
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,14 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul
9191
}
9292

9393
if (options.skipTests || options.minimal) {
94-
[
95-
'class',
96-
'component',
97-
'directive',
98-
'guard',
99-
'interceptor',
100-
'module',
101-
'pipe',
102-
'service',
103-
].forEach((type) => {
104-
if (!(`@schematics/angular:${type}` in schematics)) {
105-
schematics[`@schematics/angular:${type}`] = {};
106-
}
107-
(schematics[`@schematics/angular:${type}`] as JsonObject).skipTests = true;
108-
});
94+
['class', 'component', 'directive', 'guard', 'interceptor', 'pipe', 'service'].forEach(
95+
(type) => {
96+
if (!(`@schematics/angular:${type}` in schematics)) {
97+
schematics[`@schematics/angular:${type}`] = {};
98+
}
99+
(schematics[`@schematics/angular:${type}`] as JsonObject).skipTests = true;
100+
},
101+
);
109102
}
110103

111104
if (options.strict) {

0 commit comments

Comments
 (0)