@@ -33,11 +33,11 @@ describe('TelemetryBaseService', () => {
33
33
34
34
describe ( 'sendEvent' , ( ) => {
35
35
it ( 'should emit event' , ( ) => {
36
- service . sendEvent ( TelemetryEvents . RedisInstanceAdded , { data : 'Some data' } ) ;
36
+ service . sendEvent ( TelemetryEvents . RedisInstanceAdded , { data : 'Some data' , command : 'lowercase' } ) ;
37
37
38
38
expect ( eventEmitter . emit ) . toHaveBeenCalledWith ( AppAnalyticsEvents . Track , {
39
39
event : TelemetryEvents . RedisInstanceAdded ,
40
- eventData : { data : 'Some data' } ,
40
+ eventData : { data : 'Some data' , command : 'LOWERCASE' } ,
41
41
} ) ;
42
42
} ) ;
43
43
it ( 'should emit event with empty event data' , ( ) => {
@@ -87,13 +87,18 @@ describe('TelemetryBaseService', () => {
87
87
} ) ;
88
88
} ) ;
89
89
it ( 'should emit event with additional event data' , ( ) => {
90
- service . sendFailedEvent ( TelemetryEvents . RedisInstanceAddFailed , httpException , { data : 'Some data' } ) ;
90
+ service . sendFailedEvent (
91
+ TelemetryEvents . RedisInstanceAddFailed ,
92
+ httpException ,
93
+ { data : 'Some data' , command : 'lowercase' } ,
94
+ ) ;
91
95
92
96
expect ( eventEmitter . emit ) . toHaveBeenCalledWith ( AppAnalyticsEvents . Track , {
93
97
event : TelemetryEvents . RedisInstanceAddFailed ,
94
98
eventData : {
95
99
error : 'Internal Server Error' ,
96
100
data : 'Some data' ,
101
+ command : 'LOWERCASE' ,
97
102
} ,
98
103
} ) ;
99
104
} ) ;
0 commit comments