Skip to content

Commit

Permalink
fix(component): Revert unit test for component
Browse files Browse the repository at this point in the history
  • Loading branch information
thaiat committed Feb 3, 2016
1 parent ea9c80a commit 52f54b2
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions generators/component/templates/_component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* beautify ignore:start */
import {
it,
inject,
//inject,
injectAsync,
beforeEachProviders,
TestComponentBuilder
Expand All @@ -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();
});
});
}));

});

0 comments on commit 52f54b2

Please sign in to comment.