Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function (options: ApplicationOptions): Rule {
return chain([
addAppToWorkspaceFile(options, appDir, folderName),
addTsProjectReference('./' + join(normalize(appDir), 'tsconfig.app.json')),
options.skipTests
options.skipTests || options.minimal
? noop()
: addTsProjectReference('./' + join(normalize(appDir), 'tsconfig.spec.json')),
options.standalone
Expand Down
16 changes: 16 additions & 0 deletions packages/schematics/angular/application/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,22 @@ describe('Application Schematic', () => {
);
});

it('should not add spec project reference in the root tsconfig.json with "minimal" enabled', async () => {
const tree = await schematicRunner.runSchematic(
'application',
{ ...defaultOptions, minimal: true },
workspaceTree,
);

const { references } = readJsonFile(tree, '/tsconfig.json');
expect(references).toContain(
jasmine.objectContaining({ path: './projects/foo/tsconfig.app.json' }),
);
expect(references).not.toContain(
jasmine.objectContaining({ path: './projects/foo/tsconfig.spec.json' }),
);
});

it('should install npm dependencies when `skipInstall` is false', async () => {
await schematicRunner.runSchematic(
'application',
Expand Down
Loading