Skip to content

Commit

Permalink
fix(@schematics/angular): don't add skipTest option to module schem…
Browse files Browse the repository at this point in the history
…atic options

Closes ##20811
  • Loading branch information
Patil2099 authored and alan-agius4 committed May 19, 2021
1 parent f5f41ea commit 36b5040
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,14 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul
}

if (options.skipTests || options.minimal) {
[
'class',
'component',
'directive',
'guard',
'interceptor',
'module',
'pipe',
'service',
].forEach((type) => {
if (!(`@schematics/angular:${type}` in schematics)) {
schematics[`@schematics/angular:${type}`] = {};
}
(schematics[`@schematics/angular:${type}`] as JsonObject).skipTests = true;
});
['class', 'component', 'directive', 'guard', 'interceptor', 'pipe', 'service'].forEach(
(type) => {
if (!(`@schematics/angular:${type}` in schematics)) {
schematics[`@schematics/angular:${type}`] = {};
}
(schematics[`@schematics/angular:${type}`] as JsonObject).skipTests = true;
},
);
}

if (options.strict) {
Expand Down

0 comments on commit 36b5040

Please sign in to comment.