Skip to content

Commit b687bfb

Browse files
authored
chore(tabs): remove TestComponentBuilder (#1021)
1 parent b1363e9 commit b687bfb

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

src/components/tabs/tab-group.spec.ts

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,30 @@
1-
import {
2-
inject,
3-
async,
4-
fakeAsync,
5-
tick,
6-
TestComponentBuilder,
7-
ComponentFixture,
8-
TestBed,
9-
} from '@angular/core/testing';
1+
import {async, fakeAsync, tick, ComponentFixture, TestBed} from '@angular/core/testing';
102
import {MdTabGroup, MdTabsModule} from './tabs';
113
import {Component} from '@angular/core';
124
import {By} from '@angular/platform-browser';
135
import {Observable} from 'rxjs/Observable';
146

157

168
describe('MdTabGroup', () => {
17-
let builder: TestComponentBuilder;
189

1910
beforeEach(async(() => {
2011
TestBed.configureTestingModule({
2112
imports: [MdTabsModule],
2213
declarations: [
2314
SimpleTabsTestApp,
2415
AsyncTabsTestApp,
16+
DisabledTabsTestApp
2517
],
2618
});
2719

2820
TestBed.compileComponents();
2921
}));
3022

31-
beforeEach(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
32-
builder = tcb;
33-
}));
34-
3523
describe('basic behavior', () => {
3624
let fixture: ComponentFixture<SimpleTabsTestApp>;
3725

3826
beforeEach(async(() => {
39-
builder.createAsync(SimpleTabsTestApp).then(f => {
40-
fixture = f;
41-
});
27+
fixture = TestBed.createComponent(SimpleTabsTestApp);
4228
}));
4329

4430
it('should default to the first tab', async(() => {
@@ -155,10 +141,8 @@ describe('MdTabGroup', () => {
155141
let fixture: ComponentFixture<DisabledTabsTestApp>;
156142

157143
beforeEach(async(() => {
158-
builder.createAsync(DisabledTabsTestApp).then(f => {
159-
fixture = f;
160-
fixture.detectChanges();
161-
});
144+
fixture = TestBed.createComponent(DisabledTabsTestApp);
145+
fixture.detectChanges();
162146
}));
163147

164148
it('should disable the second tab', () => {

0 commit comments

Comments
 (0)