@@ -11,9 +11,9 @@ import {TestBed} from '@angular/core/testing';
11
11
12
12
{
13
13
describe ( 'IterableDiffers' , function ( ) {
14
- let factory1 : any ;
15
- let factory2 : any ;
16
- let factory3 : any ;
14
+ let factory1 : jasmine . SpyObj < IterableDifferFactory > ;
15
+ let factory2 : jasmine . SpyObj < IterableDifferFactory > ;
16
+ let factory3 : jasmine . SpyObj < IterableDifferFactory > ;
17
17
18
18
beforeEach ( ( ) => {
19
19
const getFactory = ( ) => jasmine . createSpyObj ( 'IterableDifferFactory' , [ 'supports' ] ) ;
@@ -33,26 +33,26 @@ import {TestBed} from '@angular/core/testing';
33
33
factory2 . supports . and . returnValue ( true ) ;
34
34
factory3 . supports . and . returnValue ( true ) ;
35
35
36
- const differs = IterableDiffers . create ( < any > [ factory1 , factory2 , factory3 ] ) ;
36
+ const differs = IterableDiffers . create ( [ factory1 , factory2 , factory3 ] ) ;
37
37
expect ( differs . find ( 'some object' ) ) . toBe ( factory2 ) ;
38
38
} ) ;
39
39
40
40
it ( 'should copy over differs from the parent repo' , ( ) => {
41
41
factory1 . supports . and . returnValue ( true ) ;
42
42
factory2 . supports . and . returnValue ( false ) ;
43
43
44
- const parent = IterableDiffers . create ( < any > [ factory1 ] ) ;
45
- const child = IterableDiffers . create ( < any > [ factory2 ] , parent ) ;
44
+ const parent = IterableDiffers . create ( [ factory1 ] ) ;
45
+ const child = IterableDiffers . create ( [ factory2 ] , parent ) ;
46
46
47
47
// @ts -expect-error private member
48
48
expect ( child . factories ) . toEqual ( [ factory2 , factory1 ] ) ;
49
49
} ) ;
50
50
51
51
describe ( '.extend()' , ( ) => {
52
52
it ( 'should extend di-inherited differs' , ( ) => {
53
- const parent = new IterableDiffers ( [ factory1 ] ) ;
53
+ const differ = new IterableDiffers ( [ factory1 ] ) ;
54
54
const injector =
55
- Injector . create ( { providers : [ { provide : IterableDiffers , useValue : parent } ] } ) ;
55
+ Injector . create ( { providers : [ { provide : IterableDiffers , useValue : differ } ] } ) ;
56
56
const childInjector =
57
57
Injector . create ( { providers : [ IterableDiffers . extend ( [ factory2 ] ) ] , parent : injector } ) ;
58
58
0 commit comments