Files
self/app/tests/__setup__/notificationServiceMock.js
nicoshark 3db25aa469 Push notification (#536)
* add push notification feature

* merge new app impl

* change dsc key

* import

* reverse mock dsc

* worked in the ios

* checked in android

* update url and delete console

* delete small changes

* lint

* add yarn.lock

* fix warning message

* add mock notification service for test code

* fix path for the mock implementation

* add mock deeplink to the test code

* nice notificationServiceMock.js

* delete unused firebase related implementation

* fix wording and UI related to notification service

* hotfix on mockdatascreen

---------

Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
2025-05-15 23:46:21 +02:00

17 lines
490 B
JavaScript

/* global jest */
// Mock for notificationService.ts
export const getStateMessage = jest.fn().mockImplementation(state => {
return 'Mock state message';
});
export const requestNotificationPermission = jest.fn().mockResolvedValue(true);
export const getFCMToken = jest.fn().mockResolvedValue('mock-fcm-token');
export const registerDeviceToken = jest.fn().mockResolvedValue();
export const setupNotifications = jest.fn().mockReturnValue(jest.fn());
export const RemoteMessage = {};