@@ -35,7 +35,7 @@ describe('EntityCacheEffects (normal testing)', () => {
35
35
mergeStrategy : typeof mergeStrategy ;
36
36
} ;
37
37
38
- function expectCompletion ( completion : any , done : DoneFn ) {
38
+ function expectCompletion ( completion : any , done : any ) {
39
39
effects . saveEntities$ . subscribe ( result => {
40
40
expect ( result ) . toEqual ( completion ) ;
41
41
done ( ) ;
@@ -45,7 +45,11 @@ describe('EntityCacheEffects (normal testing)', () => {
45
45
beforeEach ( ( ) => {
46
46
actions$ = new ReplaySubject < Action > ( 1 ) ;
47
47
correlationId = 'CORID42' ;
48
- logger = jasmine . createSpyObj ( 'Logger' , [ 'error' , 'log' , 'warn' ] ) ;
48
+ logger = {
49
+ error : jasmine . createSpy ( 'error' ) ,
50
+ log : jasmine . createSpy ( 'log' ) ,
51
+ warn : jasmine . createSpy ( 'warn' ) ,
52
+ } ;
49
53
mergeStrategy = undefined ;
50
54
options = { correlationId, mergeStrategy } ;
51
55
@@ -70,7 +74,7 @@ describe('EntityCacheEffects (normal testing)', () => {
70
74
dataService = TestBed . get ( EntityCacheDataService ) ;
71
75
} ) ;
72
76
73
- it ( 'should return a SAVE_ENTITIES_SUCCESS with the expected ChangeSet on success' , ( done : DoneFn ) => {
77
+ it ( 'should return a SAVE_ENTITIES_SUCCESS with the expected ChangeSet on success' , ( done : any ) => {
74
78
const cs = createChangeSet ( ) ;
75
79
const action = new SaveEntities ( cs , 'test/save' , options ) ;
76
80
const completion = new SaveEntitiesSuccess ( cs , 'test/save' , options ) ;
@@ -81,7 +85,7 @@ describe('EntityCacheEffects (normal testing)', () => {
81
85
dataService . setResponse ( cs ) ;
82
86
} ) ;
83
87
84
- it ( 'should not emit SAVE_ENTITIES_SUCCESS if cancel arrives in time' , ( done : DoneFn ) => {
88
+ it ( 'should not emit SAVE_ENTITIES_SUCCESS if cancel arrives in time' , ( done : any ) => {
85
89
const cs = createChangeSet ( ) ;
86
90
const action = new SaveEntities ( cs , 'test/save' , options ) ;
87
91
const cancel = new SaveEntitiesCancel ( correlationId , 'Test Cancel' ) ;
@@ -97,7 +101,7 @@ describe('EntityCacheEffects (normal testing)', () => {
97
101
dataService . setResponse ( cs ) ;
98
102
} ) ;
99
103
100
- it ( 'should emit SAVE_ENTITIES_SUCCESS if cancel arrives too late' , ( done : DoneFn ) => {
104
+ it ( 'should emit SAVE_ENTITIES_SUCCESS if cancel arrives too late' , ( done : any ) => {
101
105
const cs = createChangeSet ( ) ;
102
106
const action = new SaveEntities ( cs , 'test/save' , options ) ;
103
107
const cancel = new SaveEntitiesCancel ( correlationId , 'Test Cancel' ) ;
@@ -112,7 +116,7 @@ describe('EntityCacheEffects (normal testing)', () => {
112
116
setTimeout ( ( ) => actions$ . next ( cancel ) , 1 ) ;
113
117
} ) ;
114
118
115
- it ( 'should emit SAVE_ENTITIES_SUCCESS immediately if no changes to save' , ( done : DoneFn ) => {
119
+ it ( 'should emit SAVE_ENTITIES_SUCCESS immediately if no changes to save' , ( done : any ) => {
116
120
const action = new SaveEntities ( { changes : [ ] } , 'test/save' , options ) ;
117
121
effects . saveEntities$ . subscribe ( result => {
118
122
expect ( result instanceof SaveEntitiesSuccess ) . toBe ( true ) ;
@@ -122,7 +126,7 @@ describe('EntityCacheEffects (normal testing)', () => {
122
126
actions$ . next ( action ) ;
123
127
} ) ;
124
128
125
- xit ( 'should return a SAVE_ENTITIES_ERROR when data service fails' , ( done : DoneFn ) => {
129
+ xit ( 'should return a SAVE_ENTITIES_ERROR when data service fails' , ( done : any ) => {
126
130
const cs = createChangeSet ( ) ;
127
131
const action = new SaveEntities ( cs , 'test/save' , options ) ;
128
132
const httpError = { error : new Error ( 'Test Failure' ) , status : 501 } ;
0 commit comments