File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 11import {
2- it ,
3- describe ,
4- beforeEach ,
5- beforeEachProviders ,
2+ addProviders ,
63 inject ,
74 async ,
85} from '@angular/core/testing' ;
96import { TestComponentBuilder , ComponentFixture } from '@angular/compiler/testing' ;
10- import { Component , DebugElement , provide , ViewEncapsulation } from '@angular/core' ;
7+ import { Component , DebugElement , ViewEncapsulation } from '@angular/core' ;
118import { By } from '@angular/platform-browser' ;
129import { MdSlider , MD_SLIDER_DIRECTIVES } from './slider' ;
1310import { HAMMER_GESTURE_CONFIG } from '@angular/platform-browser' ;
@@ -17,12 +14,14 @@ describe('MdSlider', () => {
1714 let builder : TestComponentBuilder ;
1815 let gestureConfig : TestGestureConfig ;
1916
20- beforeEachProviders ( ( ) => [
21- provide ( HAMMER_GESTURE_CONFIG , { useFactory : ( ) => {
22- gestureConfig = new TestGestureConfig ( ) ;
23- return gestureConfig ;
24- } } )
25- ] ) ;
17+ beforeEach ( ( ) => {
18+ addProviders ( [
19+ { provide : HAMMER_GESTURE_CONFIG , useFactory : ( ) => {
20+ gestureConfig = new TestGestureConfig ( ) ;
21+ return gestureConfig ;
22+ } }
23+ ] ) ;
24+ } ) ;
2625
2726 beforeEach ( inject ( [ TestComponentBuilder ] , ( tcb : TestComponentBuilder ) => {
2827 builder = tcb ;
You can’t perform that action at this time.
0 commit comments