Mock expo method
This commit is contained in:
@@ -99,6 +99,7 @@ jest.mock('expo-modules-core', () => ({
|
|||||||
requireNativeViewManager: jest.fn().mockImplementation(_ => {
|
requireNativeViewManager: jest.fn().mockImplementation(_ => {
|
||||||
return () => null
|
return () => null
|
||||||
}),
|
}),
|
||||||
|
createPermissionHook: () => () => [true],
|
||||||
}))
|
}))
|
||||||
|
|
||||||
jest.mock('expo-localization', () => ({
|
jest.mock('expo-localization', () => ({
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
} from '#/analytics/features'
|
} from '#/analytics/features'
|
||||||
import {
|
import {
|
||||||
getAndMigrateDeviceId,
|
getAndMigrateDeviceId,
|
||||||
getDeviceIdOrThrow,
|
getDeviceId,
|
||||||
getInitialSessionId,
|
getInitialSessionId,
|
||||||
useSessionId,
|
useSessionId,
|
||||||
} from '#/analytics/identifiers'
|
} from '#/analytics/identifiers'
|
||||||
@@ -83,7 +83,7 @@ const Context = createContext<AnalyticsBaseContextType>({
|
|||||||
},
|
},
|
||||||
metadata: {
|
metadata: {
|
||||||
base: {
|
base: {
|
||||||
deviceId: getDeviceIdOrThrow() ?? 'unknown',
|
deviceId: getDeviceId() ?? 'unknown',
|
||||||
sessionId: getInitialSessionId(),
|
sessionId: getInitialSessionId(),
|
||||||
platform: Platform.OS,
|
platform: Platform.OS,
|
||||||
appVersion: env.APP_VERSION,
|
appVersion: env.APP_VERSION,
|
||||||
|
|||||||
Reference in New Issue
Block a user