Skip to content

Instantly share code, notes, and snippets.

@duizendnegen
Last active November 22, 2017 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duizendnegen/d31cac4695e015bdd32de6b774d4a523 to your computer and use it in GitHub Desktop.
Save duizendnegen/d31cac4695e015bdd32de6b774d4a523 to your computer and use it in GitHub Desktop.
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