From ffad6d6d0d4de6365d18963abc508bbefcf18394 Mon Sep 17 00:00:00 2001 From: sherwinski Date: Thu, 14 Nov 2024 15:57:50 -0500 Subject: [PATCH] test: suppress PushPermissionNotGrantedError --- __test__/unit/push/registerForPush.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/__test__/unit/push/registerForPush.test.ts b/__test__/unit/push/registerForPush.test.ts index 76080a535..eac2d4e3e 100644 --- a/__test__/unit/push/registerForPush.test.ts +++ b/__test__/unit/push/registerForPush.test.ts @@ -1,6 +1,7 @@ import { TestEnvironment } from '../../support/environment/TestEnvironment'; import InitHelper from '../../../src/shared/helpers/InitHelper'; import OneSignalEvent from '../../../src/shared/services/OneSignalEvent'; +import Log from '../../../src/shared/libraries/Log'; import BrowserUserAgent from '../../support/models/BrowserUserAgent'; //stub dismisshelper @@ -9,6 +10,7 @@ jest.mock('../../../src/shared/helpers/DismissHelper'); describe('Register for push', () => { beforeEach(async () => { jest.useFakeTimers(); + jest.spyOn(Log, 'error').mockImplementation(() => {}) await TestEnvironment.initialize({ addPrompts: true, userAgent: BrowserUserAgent.Default,