Moved assignments out of beforeEach as per test guidelines

This commit is contained in:
Tom Bloor 2017-08-24 17:20:46 +01:00
parent d7bb20870e
commit 371f019595

View file

@ -25,12 +25,14 @@ describe('AppComponent', () => {
] ]
}) })
.compileComponents(); .compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent); fixture = TestBed.createComponent(AppComponent);
app = fixture.componentInstance; app = fixture.componentInstance;
de = fixture.debugElement; de = fixture.debugElement;
appDocument = de.nativeElement; appDocument = de.nativeElement;
})); });
it('should create the app', async(() => { it('should create the app', async(() => {
expect(app).toBeTruthy(); expect(app).toBeTruthy();