Skip to content

Commit

Permalink
fix(@schematics/angular): don't add e2e tsconfig reference in solutio…
Browse files Browse the repository at this point in the history
…n tsconfig

Since the tsconfig for e2e’s is named tsconfig.json there is no reason why it should be included in the solutions typescript configuration file.

Closes #18190

(cherry picked from commit cc87202)
  • Loading branch information
alan-agius4 authored and clydin committed Jul 13, 2020
1 parent 27c8d22 commit c11f76a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
1 change: 0 additions & 1 deletion packages/schematics/angular/application/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ describe('Application Schematic', () => {
expect(references).toEqual([
{ path: './projects/foo/tsconfig.app.json' },
{ path: './projects/foo/tsconfig.spec.json' },
{ path: './projects/foo/e2e/tsconfig.json' },
]);
});

Expand Down
5 changes: 1 addition & 4 deletions packages/schematics/angular/e2e/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
url,
} from '@angular-devkit/schematics';
import { relativePathToWorkspaceRoot } from '../utility/paths';
import { addTsConfigProjectReferences, verifyBaseTsConfigExists } from '../utility/tsconfig';
import { verifyBaseTsConfigExists } from '../utility/tsconfig';
import { getWorkspace, updateWorkspace } from '../utility/workspace';
import { Builders } from '../utility/workspace-models';
import { Schema as E2eOptions } from './schema';
Expand Down Expand Up @@ -68,9 +68,6 @@ export default function (options: E2eOptions): Rule {
}),
move(root),
])),
addTsConfigProjectReferences([
e2eTsConfig,
]),
]);
};
}
13 changes: 0 additions & 13 deletions packages/schematics/angular/e2e/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,6 @@ describe('Application Schematic', () => {
expect(content).toMatch(/🌮-🌯/);
});

it('should add reference in solution style tsconfig', async () => {
const tree = await schematicRunner.runSchematicAsync('e2e', defaultOptions, applicationTree)
.toPromise();

// tslint:disable-next-line:no-any
const { references } = parseJson(tree.readContent('/tsconfig.json').toString(), JsonParseMode.Loose) as any;
expect(references).toEqual([
{ path: './projects/foo/tsconfig.app.json' },
{ path: './projects/foo/tsconfig.spec.json' },
{ path: './projects/foo/e2e/tsconfig.json' },
]);
});

describe('workspace config', () => {
it('should add e2e targets for the app', async () => {
const tree = await schematicRunner.runSchematicAsync('e2e', defaultOptions, applicationTree)
Expand Down
2 changes: 0 additions & 2 deletions packages/schematics/angular/universal/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,8 @@ describe('Universal Schematic', () => {
expect(references).toEqual([
{ path: './tsconfig.app.json' },
{ path: './tsconfig.spec.json' },
{ path: './e2e/tsconfig.json' },
{ path: './projects/bar/tsconfig.app.json' },
{ path: './projects/bar/tsconfig.spec.json' },
{ path: './projects/bar/e2e/tsconfig.json' },
{ path: './tsconfig.server.json' },
]);
});
Expand Down
1 change: 0 additions & 1 deletion packages/schematics/angular/web-worker/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ describe('Web Worker Schematic', () => {
expect(references).toEqual([
{ path: './projects/bar/tsconfig.app.json' },
{ path: './projects/bar/tsconfig.spec.json' },
{ path: './projects/bar/e2e/tsconfig.json' },
{ path: './projects/bar/tsconfig.worker.json' },
]);
});
Expand Down

0 comments on commit c11f76a

Please sign in to comment.