From 5d77206304e38e6c5ac1383f055e7e2a2eff9178 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Thu, 21 Dec 2023 14:27:53 +0100 Subject: [PATCH] fix --- posthog-react-native/test/posthog.spec.ts | 24 ----------------------- 1 file changed, 24 deletions(-) diff --git a/posthog-react-native/test/posthog.spec.ts b/posthog-react-native/test/posthog.spec.ts index 8add68b0..a05c3438 100644 --- a/posthog-react-native/test/posthog.spec.ts +++ b/posthog-react-native/test/posthog.spec.ts @@ -71,30 +71,6 @@ describe('PostHog React Native', () => { expect(posthog.getDistinctId()).toEqual('bar') }) - it('should initialize with in memory storage if no storage available or broken', async () => { - // preloadAsync calls getItem, getItem throws an error - const myBrokenStorageMock = (): PostHogCustomAsyncStorage => { - return { - async getItem(key: string) { - throw new Error(`error getting ${key}`) - }, - - async setItem(key: string, value: string) { - throw new Error(`error setting ${key} with the value ${value}`) - }, - } - } - - posthog = await PostHog.initAsync('test-token', { - bootstrap: { distinctId: 'bar' }, - persistence: 'file', - customAsyncStorage: myBrokenStorageMock(), - flushInterval: 0, - }) - expect(posthog.getAnonymousId()).toEqual('bar') - expect(posthog.getDistinctId()).toEqual('bar') - }) - it('should allow customising of native app properties', async () => { posthog = await PostHog.initAsync('test-token', { customAppProperties: { $app_name: 'custom' },