Skip to content

Commit 31abb81

Browse files
clydinalexeagle
authored andcommitted
test: remove all references to eject from CLI E2E tests
1 parent f58a7de commit 31abb81

22 files changed

+9
-114
lines changed

tests/legacy-cli/e2e/tests/basic/assets.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
import { ng } from '../../utils/process';
99
import { updateJsonFile } from '../../utils/project';
1010
import { expectToFail } from '../../utils/utils';
11-
import {getGlobalVariable} from '../../utils/env';
1211

1312

1413
// const temp = require('temp');
@@ -17,7 +16,6 @@ import {getGlobalVariable} from '../../utils/env';
1716
// tslint:disable:max-line-length
1817
export default function () {
1918
// Disable parts of it in webpack tests.
20-
const ejected = getGlobalVariable('argv').eject;
2119

2220
// TODO: update test
2321
return;
@@ -110,7 +108,7 @@ export default function () {
110108
// .gitkeep shouldn't be copied.
111109
.then(() => expectToFail(() => expectFileToExist('dist/assets/.gitkeep')))
112110
// Update app to test assets are present.
113-
.then(_ => !ejected && writeMultipleFiles({
111+
.then(_ => writeMultipleFiles({
114112
'src/app/app.module.ts': `
115113
import { BrowserModule } from '@angular/platform-browser';
116114
import { NgModule } from '@angular/core';
@@ -191,6 +189,6 @@ export default function () {
191189
});
192190
});`,
193191
}))
194-
.then(() => !ejected && ng('test', '--watch=false'))
195-
.then(() => !ejected && ng('e2e', 'test-project-e2e'));
192+
.then(() => ng('test', '--watch=false'))
193+
.then(() => ng('e2e', 'test-project-e2e'));
196194
}

tests/legacy-cli/e2e/tests/basic/rebuild.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@ import {
77
import {writeFile, writeMultipleFiles} from '../../utils/fs';
88
import {wait} from '../../utils/utils';
99
import {request} from '../../utils/http';
10-
import {getGlobalVariable} from '../../utils/env';
1110

1211
const validBundleRegEx = /: Compiled successfully./;
1312

1413
export default function() {
1514
if (process.platform.startsWith('win')) {
1615
return Promise.resolve();
1716
}
18-
// Skip this in ejected tests.
19-
if (getGlobalVariable('argv').eject) {
20-
return Promise.resolve();
21-
}
2217

2318
const lazyChunkRegExp = /lazy-module\.js/g;
2419

tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ import { readNgVersion } from '../../utils/version';
77

88

99
export default function () {
10-
// Skip this in ejected tests.
11-
if (getGlobalVariable('argv').eject) {
12-
return Promise.resolve();
13-
}
14-
1510
// Skip this test in Angular 2/4.
1611
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
1712
return Promise.resolve();

tests/legacy-cli/e2e/tests/build/build-app-shell.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ import { stripIndent } from 'common-tags';
88

99

1010
export default function () {
11-
// Skip this in ejected tests.
12-
if (getGlobalVariable('argv').eject) {
13-
return Promise.resolve();
14-
}
15-
1611
// Skip this test in Angular 2/4.
1712
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
1813
return Promise.resolve();

tests/legacy-cli/e2e/tests/build/build-errors.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ export default function () {
1919
return Promise.resolve();
2020
}
2121

22-
// Skip this in ejected tests.
23-
if (getGlobalVariable('argv').eject) {
24-
return Promise.resolve();
25-
}
26-
2722
// Skip this test in Angular 2/4.
2823
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
2924
return Promise.resolve();

tests/legacy-cli/e2e/tests/build/delete-output-path.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ import {getGlobalVariable} from '../../utils/env';
66
export default function() {
77
// TODO(architect): Delete this test. It is now in devkit/build-angular.
88

9-
// Skip this in ejected tests.
10-
if (getGlobalVariable('argv').eject) {
11-
return Promise.resolve();
12-
}
13-
149
return ng('build')
1510
// This is supposed to fail since there's a missing file
1611
.then(() => deleteFile('src/app/app.component.ts'))

tests/legacy-cli/e2e/tests/build/deploy-url.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export default function () {
2727
/__webpack_require__\.p = "deployUrl\/";/));
2828
// // verify slash is appended to the end of --deploy-url if missing
2929
// .then(() => ng('build', '--deploy-url=deployUrl', '--extract-css=false'))
30-
// // skip this in ejected tests
31-
// .then(() => getGlobalVariable('argv').eject
32-
// ? Promise.resolve()
33-
// : expectFileToMatch('dist/test-project/untime.js', /__webpack_require__\.p = "deployUrl\/";/));
30+
// .then(() =>
31+
// expectFileToMatch('dist/test-project/untime.js', /__webpack_require__\.p = "deployUrl\/";/));
3432
}

tests/legacy-cli/e2e/tests/build/eval-sourcemap.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
import {execAndWaitForOutputToMatch, killAllProcesses} from '../../utils/process';
2-
import {getGlobalVariable} from '../../utils/env';
32

43

54
export default function() {
65
// TODO(architect): Dev-server does not yet do this. Fix, reenable, validate, then delete this test.
76
return;
87

9-
// Skip this in ejected tests.
10-
if (getGlobalVariable('argv').eject) {
11-
return Promise.resolve();
12-
}
13-
148
return Promise.resolve()
159
// Check that ng serve has eval sourcemaps by default.
1610
.then(() => execAndWaitForOutputToMatch('ng', ['serve'], /: Compiled successfully/))

tests/legacy-cli/e2e/tests/build/json.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ import {getGlobalVariable} from '../../utils/env';
77
export default function() {
88
// TODO(architect): Delete this test. It is now in devkit/build-angular.
99

10-
// Skip this in ejected tests.
11-
if (getGlobalVariable('argv').eject) {
12-
return Promise.resolve();
13-
}
14-
1510
return ng('build', '--stats-json')
1611
.then(() => expectFileToExist('./dist/test-project/stats.json'))
1712
.then(() => expectGitToBeClean());

tests/legacy-cli/e2e/tests/build/output-dir.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ import {expectToFail} from '../../utils/utils';
99
export default function() {
1010
// TODO(architect): Delete this test. It is now in devkit/build-angular.
1111

12-
// Skip this in ejected tests.
13-
if (getGlobalVariable('argv').eject) {
14-
return Promise.resolve();
15-
}
16-
1712
return ng('build', '--output-path', 'build-output')
1813
.then(() => expectFileToExist('./build-output/index.html'))
1914
.then(() => expectFileToExist('./build-output/main.js'))

0 commit comments

Comments
 (0)