66 beforeEach ,
77 beforeEachProviders
88} from '@angular/core/testing' ;
9- import { provide , ReflectiveInjector } from '@angular/core' ;
9+ import { ReflectiveInjector } from '@angular/core' ;
1010import { BaseRequestOptions , ConnectionBackend , Http , HTTP_PROVIDERS , Response , ResponseOptions } from '@angular/http' ;
1111import 'rxjs/add/operator/map' ;
1212import { MockBackend } from '@angular/http/testing' ;
@@ -20,17 +20,17 @@ describe("Http", () => {
2020
2121 beforeEach ( ( ) => {
2222 let injector = ReflectiveInjector . resolveAndCreate ( [
23- HTTP_PROVIDERS ,
2423 BaseRequestOptions ,
2524 MockBackend ,
26- provide ( NSFileSystem , { useClass : NSFileSystemMock } ) ,
27- provide ( Http , {
28- useFactory : function ( backend : ConnectionBackend , defaultOptions : BaseRequestOptions , nsFileSystem : NSFileSystem ) {
29- //HACK: cast backend to any to work around an angular typings problem
30- return new NSHttp ( < any > backend , < any > defaultOptions , nsFileSystem ) ;
31- } ,
32- deps : [ MockBackend , BaseRequestOptions , NSFileSystem ]
33- } )
25+ { provide : NSFileSystem , useClass : NSFileSystemMock } ,
26+ {
27+ provide : Http ,
28+ useFactory : function ( backend : ConnectionBackend , defaultOptions : BaseRequestOptions , nsFileSystem : NSFileSystem ) {
29+ //HACK: cast backend to any to work around an angular typings problem
30+ return new NSHttp ( < any > backend , defaultOptions , nsFileSystem ) ;
31+ } ,
32+ deps : [ MockBackend , BaseRequestOptions , NSFileSystem ]
33+ }
3434 ] ) ;
3535
3636 backend = injector . get ( MockBackend ) ;
0 commit comments