Last active
November 22, 2017 13:26
-
-
Save duizendnegen/d31cac4695e015bdd32de6b774d4a523 to your computer and use it in GitHub Desktop.
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
import { By } from '@angular/platform-browser'; | |
import { tick } from '@angular/core/testing'; | |
describe('ExtendedHotelAddressComponent', () => { | |
// ... test setup & other tests | |
it('should display map only after 300ms', fakeAsync(() => { | |
const mapBefore = fixture.debugElement.query(By.css('agm-map')); | |
expect(mapBefore).toBeFalsy(); | |
tick(300); | |
fixture.detectChanges(); | |
fixture.whenStable().then(() => { | |
const mapAfter = fixture.debugElement.query(By.css('agm-map')); | |
expect(mapAfter).toBeTruthy(); | |
}) | |
})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment