Skip to content

Commit

Permalink
chore: update component spec file to use TestBed (#2674)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brocco authored and filipesilva committed Oct 14, 2016
1 parent 2225027 commit e562579
Showing 1 changed file with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';

import { TestBed, async } from '@angular/core/testing';
import { <%= classifiedModuleName %>Component } from './<%= dasherizedModuleName %>.component';

describe('Component: <%= classifiedModuleName %>', () => {
it('should create an instance', () => {
let component = new <%= classifiedModuleName %>Component();
describe('<%= classifiedModuleName %>Component', () => {
let component: <%= classifiedModuleName %>Component;
let fixture: ComponentFixture<<%= classifiedModuleName %>Component>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ <%= classifiedModuleName %>Component ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(<%= classifiedModuleName %>Component);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});

0 comments on commit e562579

Please sign in to comment.