From c96c8b5dbd43755e8c52a58a9085dda7605f7331 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 21 Jan 2026 19:25:24 -0600 Subject: [PATCH] Mock expo method --- jest/jestSetup.js | 1 + src/analytics/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jest/jestSetup.js b/jest/jestSetup.js index fb45da7eeb..2b9ddf5348 100644 --- a/jest/jestSetup.js +++ b/jest/jestSetup.js @@ -99,6 +99,7 @@ jest.mock('expo-modules-core', () => ({ requireNativeViewManager: jest.fn().mockImplementation(_ => { return () => null }), + createPermissionHook: () => () => [true], })) jest.mock('expo-localization', () => ({ diff --git a/src/analytics/index.tsx b/src/analytics/index.tsx index d33559a34f..ea538d1ca7 100644 --- a/src/analytics/index.tsx +++ b/src/analytics/index.tsx @@ -11,7 +11,7 @@ import { } from '#/analytics/features' import { getAndMigrateDeviceId, - getDeviceIdOrThrow, + getDeviceId, getInitialSessionId, useSessionId, } from '#/analytics/identifiers' @@ -83,7 +83,7 @@ const Context = createContext({ }, metadata: { base: { - deviceId: getDeviceIdOrThrow() ?? 'unknown', + deviceId: getDeviceId() ?? 'unknown', sessionId: getInitialSessionId(), platform: Platform.OS, appVersion: env.APP_VERSION,