Skip to content

Commit

Permalink
Update unit test to not use it, describe, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
iveysaur committed Jul 14, 2016
1 parent afe95a2 commit 0416839
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/components/slider/slider.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import {
it,
describe,
beforeEach,
beforeEachProviders,
addProviders,
inject,
async,
} from '@angular/core/testing';
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
import {Component, DebugElement, provide, ViewEncapsulation} from '@angular/core';
import {Component, DebugElement, ViewEncapsulation} from '@angular/core';
import {By} from '@angular/platform-browser';
import {MdSlider, MD_SLIDER_DIRECTIVES} from './slider';
import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser';
Expand All @@ -17,12 +14,14 @@ describe('MdSlider', () => {
let builder: TestComponentBuilder;
let gestureConfig: TestGestureConfig;

beforeEachProviders(() => [
provide(HAMMER_GESTURE_CONFIG, {useFactory: () => {
gestureConfig = new TestGestureConfig();
return gestureConfig;
}})
]);
beforeEach(() => {
addProviders([
{provide: HAMMER_GESTURE_CONFIG, useFactory: () => {
gestureConfig = new TestGestureConfig();
return gestureConfig;
}}
]);
});

beforeEach(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
builder = tcb;
Expand Down

0 comments on commit 0416839

Please sign in to comment.