@@ -8,6 +8,7 @@ import { useNotifications } from '../hooks/useNotifications';
8
8
import * as apiRequests from '../utils/api-requests' ;
9
9
import * as comms from '../utils/comms' ;
10
10
import * as storage from '../utils/storage' ;
11
+ import * as notifications from '../utils/notifications' ;
11
12
12
13
jest . mock ( '../hooks/useNotifications' ) ;
13
14
@@ -35,6 +36,11 @@ describe('context/App.tsx', () => {
35
36
36
37
describe ( 'api methods' , ( ) => {
37
38
const apiRequestAuthMock = jest . spyOn ( apiRequests , 'apiRequestAuth' ) ;
39
+ const getNotificationCountMock = jest . spyOn (
40
+ notifications ,
41
+ 'getNotificationCount' ,
42
+ ) ;
43
+ getNotificationCountMock . mockReturnValue ( 1 ) ;
38
44
39
45
const fetchNotificationsMock = jest . fn ( ) ;
40
46
const markNotificationMock = jest . fn ( ) ;
@@ -285,12 +291,13 @@ describe('context/App.tsx', () => {
285
291
expect ( saveStateMock ) . toHaveBeenCalledWith (
286
292
{ enterpriseAccounts : [ ] , token : null , user : null } ,
287
293
{
288
- theme : 'SYSTEM' ,
289
- openAtStartup : false ,
290
294
participating : true ,
291
295
playSound : true ,
292
296
showNotifications : true ,
293
297
showBots : true ,
298
+ showNotificationsCountInTray : false ,
299
+ openAtStartup : false ,
300
+ theme : 'SYSTEM' ,
294
301
colors : null ,
295
302
markAsDoneOnOpen : false ,
296
303
} ,
@@ -324,12 +331,13 @@ describe('context/App.tsx', () => {
324
331
expect ( saveStateMock ) . toHaveBeenCalledWith (
325
332
{ enterpriseAccounts : [ ] , token : null , user : null } ,
326
333
{
327
- theme : 'SYSTEM' ,
328
- openAtStartup : true ,
329
334
participating : false ,
330
335
playSound : true ,
331
336
showNotifications : true ,
332
337
showBots : true ,
338
+ showNotificationsCountInTray : false ,
339
+ openAtStartup : true ,
340
+ theme : 'SYSTEM' ,
333
341
colors : null ,
334
342
markAsDoneOnOpen : false ,
335
343
} ,
0 commit comments