chore(formatting): fix formatting for component fixture spec (#10986)
This commit is contained in:
parent
9883e19e2e
commit
ece7985b8a
@ -120,23 +120,23 @@ export function main() {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should signal through whenStable when the fixture is stable (autoDetectChanges)',
|
it('should signal through whenStable when the fixture is stable (autoDetectChanges)',
|
||||||
async(() => {
|
async(() => {
|
||||||
let componentFixture = TestBed.createComponent(AsyncComp);
|
let componentFixture = TestBed.createComponent(AsyncComp);
|
||||||
componentFixture.autoDetectChanges();
|
componentFixture.autoDetectChanges();
|
||||||
expect(componentFixture.nativeElement).toHaveText('1');
|
expect(componentFixture.nativeElement).toHaveText('1');
|
||||||
|
|
||||||
let element = componentFixture.debugElement.children[0];
|
let element = componentFixture.debugElement.children[0];
|
||||||
dispatchEvent(element.nativeElement, 'click');
|
dispatchEvent(element.nativeElement, 'click');
|
||||||
expect(componentFixture.nativeElement).toHaveText('1');
|
expect(componentFixture.nativeElement).toHaveText('1');
|
||||||
|
|
||||||
// Component is updated asynchronously. Wait for the fixture to become stable
|
// Component is updated asynchronously. Wait for the fixture to become stable
|
||||||
// before checking for new value.
|
// before checking for new value.
|
||||||
expect(componentFixture.isStable()).toBe(false);
|
expect(componentFixture.isStable()).toBe(false);
|
||||||
componentFixture.whenStable().then((waited) => {
|
componentFixture.whenStable().then((waited) => {
|
||||||
expect(waited).toBe(true);
|
expect(waited).toBe(true);
|
||||||
expect(componentFixture.nativeElement).toHaveText('11');
|
expect(componentFixture.nativeElement).toHaveText('11');
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should signal through isStable when the fixture is stable (no autoDetectChanges)',
|
it('should signal through isStable when the fixture is stable (no autoDetectChanges)',
|
||||||
async(() => {
|
async(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user