How to use the @angular/core/testing.async function in @angular/core

To help you get started, we’ve selected a few @angular/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vmware-tanzu / octant / web / src / app / modules / overview / components / containers / containers.component.spec.ts View on Github external
describe('ContainersComponent', () => {
  let component: ContainersComponent;
  let fixture: ComponentFixture;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ContainersComponent],
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(ContainersComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
github codediodeio / angular-firestarter / src / app / app.component.spec.ts View on Github external
UiModule,
        NotesModule,
        AngularFireModule.initializeApp(environment.firebase, 'firestarter'),
        AngularFirestoreModule,
        AngularFireAuthModule,
        AngularFireStorageModule
      ],
      declarations: [AppComponent]
    }).compileComponents();
  }));
  it('should create the app', async(() => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app).toBeTruthy();
  }));
  it(`should have as title 'app'`, async(() => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app.title).toEqual('app');
  }));
});
github madoar / angular-archwizard / src / lib / navigation / semi-strict-navigation-mode.spec.ts View on Github external
describe('SemiStrictNavigationMode', () => {
  let wizardTest: WizardTestComponent;
  let wizardTestFixture: ComponentFixture;

  let wizardState: WizardState;
  let navigationMode: NavigationMode;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [WizardTestComponent],
      imports: [ArchwizardModule]
    }).compileComponents();
  }));

  beforeEach(() => {
    wizardTestFixture = TestBed.createComponent(WizardTestComponent);
    wizardTestFixture.detectChanges();

    wizardTest = wizardTestFixture.componentInstance;
    wizardState = wizardTestFixture.debugElement.query(By.css('aw-wizard')).injector.get(WizardState);
    navigationMode = wizardState.navigationMode;
  });

  it('should create', () => {
github cloudfoundry / stratos / src / frontend / app / shared / components / start-end-date / start-end-date.component.spec.ts View on Github external
describe('StartEndDateComponent', () => {
  let component: StartEndDateComponent;
  let fixture: ComponentFixture;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        SharedModule,
        NoopAnimationsModule
      ]
    })
      .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(StartEndDateComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
github cloudfoundry / stratos / src / frontend / app / custom / kubernetes / kubernetes-node / kubernetes-node-pods / kubernetes-node-pods.component.spec.ts View on Github external
describe('KubernetesNodePodsComponent', () => {
  let component: KubernetesNodePodsComponent;
  let fixture: ComponentFixture;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [KubernetesNodePodsComponent],
      imports: BaseTestModules,
      providers: [BaseKubeGuid, KubernetesEndpointService, KubernetesNodeService]
    })
      .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(KubernetesNodePodsComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
github aviabird / yatrum / src / app / components / user / user-profile / user-media / user-media.component.spec.ts View on Github external
describe('UserMediaComponent', () => {
  let component: UserMediaComponent;
  let fixture: ComponentFixture;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ UserMediaComponent ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(UserMediaComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
github codelab-fun / codelab / apps / kirjs / src / app / modules / cellular-automation / rule3 / rule4 / rule4.component.spec.ts View on Github external
describe('Rule4Component', () => {
  let component: Rule4Component;
  let fixture: ComponentFixture;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [Rule4Component]
    }).compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(Rule4Component);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
github fabric8-ui / fabric8-ui / src / a-runtime-console / kubernetes / ui / namespace / view-wrapper / view-wrapper.namespace.spec.ts View on Github external
describe('NamespaceViewWrapperComponent', () => {
  let namespace: NamespaceViewWrapperComponent;
  let fixture: ComponentFixture;

  beforeEach(async(() => {
    TestBed
      .configureTestingModule({
        imports: [
          RouterTestingModule.withRoutes([]),
          Fabric8CommonModule,
          FormsModule,
          MomentModule,
          ModalModule,
          RestangularModule.forRoot(),
          KubernetesStoreModule,
          TestAppModule
        ],
        declarations: [
          NamespaceViewWrapperComponent,
          NamespaceViewToolbarComponent,
          NamespaceViewComponent,
github udos86 / ng-dynamic-forms / projects / ng-dynamic-forms / ui-kendo / src / lib / dynamic-kendo-form-control-container.component.spec.ts View on Github external
new DynamicRadioGroupModel({id: "radioGroup"}),
            new DynamicRatingModel({id: "rating"}),
            new DynamicSelectModel({id: "select", options: [{value: "One"}, {value: "Two"}], value: "One"}),
            new DynamicSliderModel({id: "slider"}),
            new DynamicSwitchModel({id: "switch"}),
            new DynamicTextAreaModel({id: "textarea"}),
            new DynamicTimePickerModel({id: "timepicker"})
        ],
        testModel = formModel[11],
        formGroup: FormGroup,
        fixture: ComponentFixture,
        component: DynamicKendoFormControlContainerComponent,
        debugElement: DebugElement,
        testElement: DebugElement;

    beforeEach(async(() => {

        TestBed.overrideModule(BrowserDynamicTestingModule, {

            set: {
                entryComponents: [DynamicKendoDropdownListComponent]
            }
        });

        TestBed.configureTestingModule({

            imports: [
                ReactiveFormsModule,
                DateInputsModule,
                DropDownsModule,
                InputsModule,
                UploadModule,
github SAP / fundamental-ngx / libs / core / src / lib / localizator-editor / localization-editor-item / localization-editor-item.component.spec.ts View on Github external
describe('LocalizationEditorItemComponent', () => {
    let component: LocalizationEditorItemComponent;
    let fixture: ComponentFixture;

    beforeEach(async(() => {
        TestBed.configureTestingModule({
            imports: [
                LocalizationEditorModule,
                CommonModule
            ],
            declarations: [
                TestLocalizationItemComponent
            ]
        })
            .compileComponents();
    }));

    beforeEach(() => {
        fixture = TestBed.createComponent(TestLocalizationItemComponent);
        component = fixture.debugElement.children[0].componentInstance;
        fixture.detectChanges();