6
6
beforeEach ,
7
7
beforeEachProviders
8
8
} from '@angular/core/testing' ;
9
- import { provide , ReflectiveInjector } from '@angular/core' ;
9
+ import { ReflectiveInjector } from '@angular/core' ;
10
10
import { BaseRequestOptions , ConnectionBackend , Http , HTTP_PROVIDERS , Response , ResponseOptions } from '@angular/http' ;
11
11
import 'rxjs/add/operator/map' ;
12
12
import { MockBackend } from '@angular/http/testing' ;
@@ -20,17 +20,17 @@ describe("Http", () => {
20
20
21
21
beforeEach ( ( ) => {
22
22
let injector = ReflectiveInjector . resolveAndCreate ( [
23
- HTTP_PROVIDERS ,
24
23
BaseRequestOptions ,
25
24
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
+ }
34
34
] ) ;
35
35
36
36
backend = injector . get ( MockBackend ) ;
0 commit comments