From 52f54b2747565dcb45c8126e513e676b7d2a5133 Mon Sep 17 00:00:00 2001 From: Avi Haiat Date: Wed, 3 Feb 2016 15:25:00 +0200 Subject: [PATCH] fix(component): Revert unit test for component --- .../component/templates/_component.spec.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/generators/component/templates/_component.spec.ts b/generators/component/templates/_component.spec.ts index b128b0a..c723a72 100644 --- a/generators/component/templates/_component.spec.ts +++ b/generators/component/templates/_component.spec.ts @@ -1,7 +1,7 @@ /* beautify ignore:start */ import { it, - inject, + //inject, injectAsync, beforeEachProviders, TestComponentBuilder @@ -13,21 +13,15 @@ describe('Component: <%=componentnameClass%>Component', () => { let builder; beforeEachProviders(() => []); - beforeEach(inject([TestComponentBuilder], (tcb) => { - builder = tcb; - })); - - it('should be defined', (done) => { - return builder - .createAsync(<%=componentnameClass%>Component) + it('should be defined', injectAsync([TestComponentBuilder], (tcb) => { + return tcb.createAsync(<%=componentnameClass%>Component) .then((fixture) => { fixture.detectChanges(); - let cmpInstance = fixture.debugElement.componentInstance; let element = fixture.debugElement.nativeElement; + let cmpInstance = fixture.debugElement.componentInstance; expect(cmpInstance).toBeDefined(); expect(element).toBeDefined(); - done(); }); - }); + })); }); \ No newline at end of file