Skip to content

Commit f03b493

Browse files
committed
fix(@schematics/schematics): Fix handling of returned promises
Avoid floating promises Rationale: https://palantir.github.io/tslint/rules/no-floating-promises/
1 parent 2cfe1a4 commit f03b493

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

integration/angular_cli/e2e/src/app.e2e-spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ describe('workspace-project App', () => {
88
page = new AppPage();
99
});
1010

11-
it('should display welcome message', () => {
12-
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('integration-project app is running!');
11+
it('should display welcome message', async () => {
12+
await page.navigateTo();
13+
await expect(await page.getTitleText()).toEqual('integration-project app is running!');
1414
});
1515

1616
afterEach(async () => {

packages/angular_devkit/build_angular/test/hello-world-app/e2e/app.e2e-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('hello-world-app App', () => {
1515
});
1616

1717
it('should display welcome message', () => {
18-
page.navigateTo();
19-
expect(page.getTitleText()).toEqual('Welcome to app!');
18+
await page.navigateTo();
19+
await expect(await page.getTitleText()).toEqual('Welcome to app!');
2020
});
2121
});

packages/schematics/angular/e2e/files/src/app.e2e-spec.ts.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ describe('workspace-project App', () => {
88
page = new AppPage();
99
});
1010

11-
it('should display welcome message', () => {
12-
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('<%= relatedAppName %> app is running!');
11+
it('should display welcome message', async () => {
12+
await page.navigateTo();
13+
await expect(await page.getTitleText()).toEqual('<%= relatedAppName %> app is running!');
1414
});
1515

1616
afterEach(async () => {

0 commit comments

Comments
 (0)