/* beautify ignore:start */
import {
	it,
	//inject,
	injectAsync,
	beforeEachProviders,
	TestComponentBuilder
} from 'angular2/testing';
import {<%=componentnameClass%>Component} from './<%=componentnameFile%>.component.ts';
/* beautify ignore:end */

describe('Component: <%=componentnameClass%>Component', () => {
    let builder;
    beforeEachProviders(() => []);

    it('should be defined', injectAsync([TestComponentBuilder], (tcb) => {
        return tcb.createAsync(<%=componentnameClass%>Component)
            .then((fixture) => {
                fixture.detectChanges();
                let element = fixture.debugElement.nativeElement;
                let cmpInstance = fixture.debugElement.componentInstance;
                expect(cmpInstance).toBeDefined();
                expect(element).toBeDefined();
            });
    }));

});
/* beautify ignore:start */
import {
	it,
	inject,
	injectAsync,
	beforeEachProviders,
	TestComponentBuilder
} from 'angular2/testing';
import {<%=componentnameClass%>Component} from './<%=componentnameFile%>.component.ts';
/* beautify ignore:end */

describe('Component: <%=componentnameClass%>Component', () => {
    let builder;
    beforeEachProviders(() => []);

    beforeEach(inject([TestComponentBuilder], (tcb) => {
        builder = tcb;
    }));

    it('should be defined', (done) => {
        return builder
            .createAsync(<%=componentnameClass%>Component)
            .then((fixture) => {
                fixture.detectChanges();
                let cmpInstance = fixture.debugElement.componentInstance;
                let element = fixture.debugElement.nativeElement;
                expect(cmpInstance).toBeDefined();
                expect(element).toBeDefined();
                done();
            });
    });

});
--- 
+++ 
@@ -1,7 +1,7 @@
 /* beautify ignore:start */
 import {
 	it,
-	inject,
+	//inject,
 	injectAsync,
 	beforeEachProviders,
 	TestComponentBuilder
@@ -13,21 +13,15 @@
     let builder;
     beforeEachProviders(() => []);
 
-    beforeEach(inject([TestComponentBuilder], (tcb) => {
-        builder = tcb;
+    it('should be defined', injectAsync([TestComponentBuilder], (tcb) => {
+        return tcb.createAsync(<%=componentnameClass%>Component)
+            .then((fixture) => {
+                fixture.detectChanges();
+                let element = fixture.debugElement.nativeElement;
+                let cmpInstance = fixture.debugElement.componentInstance;
+                expect(cmpInstance).toBeDefined();
+                expect(element).toBeDefined();
+            });
     }));
 
-    it('should be defined', (done) => {
-        return builder
-            .createAsync(<%=componentnameClass%>Component)
-            .then((fixture) => {
-                fixture.detectChanges();
-                let cmpInstance = fixture.debugElement.componentInstance;
-                let element = fixture.debugElement.nativeElement;
-                expect(cmpInstance).toBeDefined();
-                expect(element).toBeDefined();
-                done();
-            });
-    });
-
 });
fix(component): Revert unit test for component
