Skip to content

Commit 38c146a

Browse files
committed
fix(@schematics/angular): remove test build options from angular.json if skipTests is passed
1 parent 741cca7 commit 38c146a

File tree

1 file changed

+13
-12
lines changed
  • packages/schematics/angular/application

1 file changed

+13
-12
lines changed

packages/schematics/angular/application/index.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,20 @@ function addAppToWorkspaceFile(
276276
browserTarget: `${options.name}:build`,
277277
},
278278
},
279-
test: options.minimal
280-
? undefined
281-
: {
282-
builder: Builders.Karma,
283-
options: {
284-
polyfills: ['zone.js', 'zone.js/testing'],
285-
tsConfig: `${projectRoot}tsconfig.spec.json`,
286-
inlineStyleLanguage,
287-
assets: [`${sourceRoot}/favicon.ico`, `${sourceRoot}/assets`],
288-
styles: [`${sourceRoot}/styles.${options.style}`],
289-
scripts: [],
279+
test:
280+
options.minimal || options.skipTests
281+
? undefined
282+
: {
283+
builder: Builders.Karma,
284+
options: {
285+
polyfills: ['zone.js', 'zone.js/testing'],
286+
tsConfig: `${projectRoot}tsconfig.spec.json`,
287+
inlineStyleLanguage,
288+
assets: [`${sourceRoot}/favicon.ico`, `${sourceRoot}/assets`],
289+
styles: [`${sourceRoot}/styles.${options.style}`],
290+
scripts: [],
291+
},
290292
},
291-
},
292293
},
293294
};
294295

0 commit comments

Comments
 (0)