Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c11f76a

Browse files
alan-agius4clydin
authored andcommittedJul 13, 2020
fix(@schematics/angular): don't add e2e tsconfig reference in solution 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)
1 parent 27c8d22 commit c11f76a

File tree

5 files changed

+1
-21
lines changed

5 files changed

+1
-21
lines changed
 

‎packages/schematics/angular/application/index_spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ describe('Application Schematic', () => {
8888
expect(references).toEqual([
8989
{ path: './projects/foo/tsconfig.app.json' },
9090
{ path: './projects/foo/tsconfig.spec.json' },
91-
{ path: './projects/foo/e2e/tsconfig.json' },
9291
]);
9392
});
9493

‎packages/schematics/angular/e2e/index.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
url,
1919
} from '@angular-devkit/schematics';
2020
import { relativePathToWorkspaceRoot } from '../utility/paths';
21-
import { addTsConfigProjectReferences, verifyBaseTsConfigExists } from '../utility/tsconfig';
21+
import { verifyBaseTsConfigExists } from '../utility/tsconfig';
2222
import { getWorkspace, updateWorkspace } from '../utility/workspace';
2323
import { Builders } from '../utility/workspace-models';
2424
import { Schema as E2eOptions } from './schema';
@@ -68,9 +68,6 @@ export default function (options: E2eOptions): Rule {
6868
}),
6969
move(root),
7070
])),
71-
addTsConfigProjectReferences([
72-
e2eTsConfig,
73-
]),
7471
]);
7572
};
7673
}

‎packages/schematics/angular/e2e/index_spec.ts

-13
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,6 @@ describe('Application Schematic', () => {
8282
expect(content).toMatch(/🌮-🌯/);
8383
});
8484

85-
it('should add reference in solution style tsconfig', async () => {
86-
const tree = await schematicRunner.runSchematicAsync('e2e', defaultOptions, applicationTree)
87-
.toPromise();
88-
89-
// tslint:disable-next-line:no-any
90-
const { references } = parseJson(tree.readContent('/tsconfig.json').toString(), JsonParseMode.Loose) as any;
91-
expect(references).toEqual([
92-
{ path: './projects/foo/tsconfig.app.json' },
93-
{ path: './projects/foo/tsconfig.spec.json' },
94-
{ path: './projects/foo/e2e/tsconfig.json' },
95-
]);
96-
});
97-
9885
describe('workspace config', () => {
9986
it('should add e2e targets for the app', async () => {
10087
const tree = await schematicRunner.runSchematicAsync('e2e', defaultOptions, applicationTree)

‎packages/schematics/angular/universal/index_spec.ts

-2
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,8 @@ describe('Universal Schematic', () => {
273273
expect(references).toEqual([
274274
{ path: './tsconfig.app.json' },
275275
{ path: './tsconfig.spec.json' },
276-
{ path: './e2e/tsconfig.json' },
277276
{ path: './projects/bar/tsconfig.app.json' },
278277
{ path: './projects/bar/tsconfig.spec.json' },
279-
{ path: './projects/bar/e2e/tsconfig.json' },
280278
{ path: './tsconfig.server.json' },
281279
]);
282280
});

‎packages/schematics/angular/web-worker/index_spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ describe('Web Worker Schematic', () => {
162162
expect(references).toEqual([
163163
{ path: './projects/bar/tsconfig.app.json' },
164164
{ path: './projects/bar/tsconfig.spec.json' },
165-
{ path: './projects/bar/e2e/tsconfig.json' },
166165
{ path: './projects/bar/tsconfig.worker.json' },
167166
]);
168167
});

0 commit comments

Comments
 (0)
Please sign in to comment.