Skip to content

Commit

Permalink
Revert changes to react-native-expo
Browse files Browse the repository at this point in the history
  • Loading branch information
romin-halltari committed Dec 21, 2023
1 parent 675925c commit 9108281
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 2 additions & 3 deletions packages/@magic-sdk/react-native-expo/test/factories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import browserEnv from '@ikscodes/browser-env';
import { MagicSDKAdditionalConfiguration } from '@magic-sdk/provider';
import { MAGIC_RELAYER_FULL_URL, ENCODED_QUERY_PARAMS, TEST_API_KEY } from './constants';

export function createReactNativeWebViewController(endpoint = MAGIC_RELAYER_FULL_URL) {
Expand All @@ -9,8 +8,8 @@ export function createReactNativeWebViewController(endpoint = MAGIC_RELAYER_FULL
return viewController;
}

export function createMagicSDK(options?: MagicSDKAdditionalConfiguration) {
export function createMagicSDK(endpoint = MAGIC_RELAYER_FULL_URL) {
const { Magic } = jest.requireActual('../src/index.ts');
browserEnv.stub('console.warn', jest.fn());
return new Magic(TEST_API_KEY, options);
return new Magic(TEST_API_KEY, { endpoint });
}
4 changes: 0 additions & 4 deletions packages/@magic-sdk/react-native-expo/test/mocks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import AsyncStorageMock from '@react-native-async-storage/async-storage/jest/async-storage-mock';

// @react-native-community/netinfo mocks
const defaultState = {
type: 'cellular',
Expand Down Expand Up @@ -59,5 +57,3 @@ export function removeReactDependencies() {
// https://github.com/aveq-research/localforage-asyncstorage-driver/issues/1
jest.mock('@aveq-research/localforage-asyncstorage-driver', noopModule);
}

jest.mock('@react-native-async-storage/async-storage', () => AsyncStorageMock);

0 comments on commit 9108281

Please sign in to comment.