Skip to content
Snippets Groups Projects
Commit 5e523a56 authored by Art Lowel's avatar Art Lowel
Browse files

Merge remote-tracking branch 'upstream/pr/37' into inital-tests

parents 8e4bec9c bd29e4ad
No related merge requests found
......@@ -9,11 +9,11 @@ import {
CUSTOM_ELEMENTS_SCHEMA,
DebugElement
} from "@angular/core";
import { By } from '@angular/platform-browser';
import { TranslateModule } from "ng2-translate";
import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap';
import { Store } from "@ngrx/store";
// Load the implementations that should be tested
import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
......@@ -25,10 +25,10 @@ let fixture: ComponentFixture<AppComponent>;
let de: DebugElement;
let el: HTMLElement;
describe('App component', () => {
beforeEach(() => {
// async beforeEach
beforeEach(async(() => {
return TestBed.configureTestingModule({
imports: [ CommonModule, TranslateModule.forRoot(), NgbCollapseModule.forRoot()],
declarations: [ AppComponent, HeaderComponent ], // declare the test component
......@@ -40,10 +40,18 @@ describe('App component', () => {
}
],
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
});
})
}));
// synchronous beforeEach
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
comp = fixture.componentInstance; // BannerComponent test instance
// query for the title <p> by CSS element selector
de = fixture.debugElement.query(By.css('p'));
el = de.nativeElement;
});
it('should create component', inject([AppComponent], (app: AppComponent) => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment