From c5c9b8bb402f68613bea657a6fc88078c4246cd0 Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Tue, 29 Aug 2023 13:45:28 +0200 Subject: [PATCH] [TS migration] Migrate 'Notification' lib to TypeScript --- .../{LocalNotification.js => LocalNotification.ts} | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) rename src/libs/Notification/__mocks__/{LocalNotification.js => LocalNotification.ts} (71%) diff --git a/src/libs/Notification/__mocks__/LocalNotification.js b/src/libs/Notification/__mocks__/LocalNotification.ts similarity index 71% rename from src/libs/Notification/__mocks__/LocalNotification.js rename to src/libs/Notification/__mocks__/LocalNotification.ts index fa97f7f7515e..5ba17cc0f407 100644 --- a/src/libs/Notification/__mocks__/LocalNotification.js +++ b/src/libs/Notification/__mocks__/LocalNotification.ts @@ -2,6 +2,12 @@ // any index.native.js files as they are using a react-native plugin. However, it is useful to mock this behavior so that we // can test the expected web behavior and see if a browser notification would be shown or not. -export default { +type LocalNotification = { + showCommentNotification: () => void; +}; + +const localNotification: LocalNotification = { showCommentNotification: jest.fn(), }; + +export default localNotification;