@@ -36,28 +36,17 @@ describe('renderer/utils/notifications/handlers/default.ts', () => {
3636 } ) ;
3737
3838 describe ( 'iconColor' , ( ) => {
39- const cases : Array < [ GitifyNotificationState | null , IconColor ] > = [
40- [ 'OPEN' as GitifyNotificationState , IconColor . GREEN ] ,
41- [ 'REOPENED' as GitifyNotificationState , IconColor . GREEN ] ,
42- [ 'ANSWERED' as GitifyNotificationState , IconColor . GREEN ] ,
43- [ 'SUCCESS' as GitifyNotificationState , IconColor . GREEN ] ,
44- [ 'CLOSED' as GitifyNotificationState , IconColor . RED ] ,
45- [ 'FAILURE' as GitifyNotificationState , IconColor . RED ] ,
46- [ 'COMPLETED' as GitifyNotificationState , IconColor . PURPLE ] ,
47- [ 'RESOLVED' as GitifyNotificationState , IconColor . PURPLE ] ,
48- [ 'MERGED' as GitifyNotificationState , IconColor . PURPLE ] ,
49- [ 'NOT_PLANNED' as GitifyNotificationState , IconColor . GRAY ] ,
50- [ 'DRAFT' as GitifyNotificationState , IconColor . GRAY ] ,
51- [ 'SKIPPED' as GitifyNotificationState , IconColor . GRAY ] ,
52- [ 'CANCELLED' as GitifyNotificationState , IconColor . GRAY ] ,
53- [ 'unknown' as GitifyNotificationState , IconColor . GRAY ] ,
54- [ null , IconColor . GRAY ] ,
55- [ undefined , IconColor . GRAY ] ,
56- ] ;
57-
58- it . each ( cases ) ( 'returns correct color for state %s' , ( state , expected ) => {
59- const subject = createMockSubject ( { state } ) ;
60- expect ( defaultHandler . iconColor ( subject ) ) . toBe ( expected ) ;
39+ it ( 'returns GRAY for any state (fallback behavior)' , ( ) => {
40+ const states : Array < StateType | null | undefined > = [
41+ 'unknown' as StateType ,
42+ null ,
43+ undefined ,
44+ ] ;
45+
46+ states . forEach ( ( state ) => {
47+ const subject = createMockSubject ( { state } ) ;
48+ expect ( defaultHandler . iconColor ( subject ) ) . toBe ( IconColor . GRAY ) ;
49+ } ) ;
6150 } ) ;
6251 } ) ;
6352
0 commit comments