Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): update reference and doc to change
async
to waitAsync
. (
#37583) The last commit change `async` to `waitForAsync`. This commit update all usages in the code and also update aio doc. PR Close #37583
- Loading branch information
1 parent
8f07429
commit 8fbf40b
Showing
78 changed files
with
1,381 additions
and
1,386 deletions.
There are no files selected for viewing
42 changes: 21 additions & 21 deletions
42
aio/content/examples/forms-overview/src/app/app.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
import { TestBed, async } from '@angular/core/testing'; | ||
import { TestBed, waitForAsync } from '@angular/core/testing'; | ||
|
||
import { AppComponent } from './app.component'; | ||
import { TemplateModule } from './template/template.module'; | ||
import { ReactiveModule } from './reactive/reactive.module'; | ||
import { TemplateModule } from './template/template.module'; | ||
|
||
describe('AppComponent', () => { | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [ReactiveModule, TemplateModule], | ||
declarations: [ | ||
AppComponent | ||
], | ||
}).compileComponents(); | ||
beforeEach(waitForAsync(() => { | ||
TestBed | ||
.configureTestingModule({ | ||
imports: [ReactiveModule, TemplateModule], | ||
declarations: [AppComponent], | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
it('should create the app', async(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
it('should create the app', waitForAsync(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
|
||
expect(app).toBeTruthy(); | ||
})); | ||
expect(app).toBeTruthy(); | ||
})); | ||
|
||
it('should render title', async(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
fixture.detectChanges(); | ||
it('should render title', waitForAsync(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
fixture.detectChanges(); | ||
|
||
const compiled = fixture.debugElement.nativeElement; | ||
expect(compiled.querySelector('h1').textContent).toContain('Forms Overview'); | ||
})); | ||
const compiled = fixture.debugElement.nativeElement; | ||
expect(compiled.querySelector('h1').textContent).toContain('Forms Overview'); | ||
})); | ||
}); |
15 changes: 7 additions & 8 deletions
15
.../examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
...ontent/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.