Mock expo method

This commit is contained in:
Eric Bailey
2026-01-21 19:25:24 -06:00
parent aa44dcc5d2
commit c96c8b5dbd
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -99,6 +99,7 @@ jest.mock('expo-modules-core', () => ({
requireNativeViewManager: jest.fn().mockImplementation(_ => {
return () => null
}),
createPermissionHook: () => () => [true],
}))
jest.mock('expo-localization', () => ({
+2 -2
View File
@@ -11,7 +11,7 @@ import {
} from '#/analytics/features'
import {
getAndMigrateDeviceId,
getDeviceIdOrThrow,
getDeviceId,
getInitialSessionId,
useSessionId,
} from '#/analytics/identifiers'
@@ -83,7 +83,7 @@ const Context = createContext<AnalyticsBaseContextType>({
},
metadata: {
base: {
deviceId: getDeviceIdOrThrow() ?? 'unknown',
deviceId: getDeviceId() ?? 'unknown',
sessionId: getInitialSessionId(),
platform: Platform.OS,
appVersion: env.APP_VERSION,