chore: self UUID namespace as a const (#1685)

This commit is contained in:
Leszek Stachowski
2026-02-03 12:44:34 +01:00
committed by GitHub
parent 2fd8d18107
commit 2ebf7918c7
4 changed files with 6 additions and 12 deletions

View File

@@ -87,10 +87,10 @@ jest.mock('@/integrations/haptics', () => ({
}));
jest.mock('@/services/notifications/notificationService', () => ({
...jest.requireActual('@/services/notifications/notificationService'),
requestNotificationPermission: jest.fn(),
getFCMToken: jest.fn(),
registerDeviceToken: jest.fn(),
getSelfUuidNamespace: jest.fn(() => '1eebc0f5-eee9-45a4-9474-a0d103b9f20c'),
}));
jest.mock('@/config/sentry', () => ({
@@ -119,8 +119,6 @@ const mockUseNavigation = useNavigation as jest.MockedFunction<
const { useSelfClient } = jest.requireMock('@selfxyz/mobile-sdk-alpha');
const { useSettingStore } = jest.requireMock('@/stores/settingStore');
const MOCK_SELF_UUID_NAMESPACE = '1eebc0f5-eee9-45a4-9474-a0d103b9f20c';
describe('KycSuccessScreen', () => {
const mockNavigate = jest.fn();
const mockTrackEvent = jest.fn();
@@ -204,7 +202,7 @@ describe('KycSuccessScreen', () => {
await waitFor(() => {
// Verify device token was registered with deterministic session ID
expect(notificationService.registerDeviceToken).toHaveBeenCalledWith(
uuidv5(mockUserId, MOCK_SELF_UUID_NAMESPACE),
uuidv5(mockUserId, notificationService.SELF_UUID_NAMESPACE),
mockFcmToken,
);
});