This repository has been archived on 2025-06-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dusken-client/jestSetup.js
nikolark eeef714043 ✨ Add stripe dep
⬆ Relock deps, fixing some warnings
2022-08-01 00:35:48 +02:00

23 lines
818 B
JavaScript

/* eslint-disable import/no-extraneous-dependencies */
// ref https://github.com/kmagiera/react-native-gesture-handler/issues/344#issuecomment-489208684
import { NativeModules } from 'react-native';
// ref https://react-native-async-storage.github.io/async-storage/docs/advanced/jest
import mockAsyncStorage from '@react-native-async-storage/async-storage/jest/async-storage-mock';
jest.doMock('react-dom/server', () => {}, { virtual: true });
global.fetch = require('jest-fetch-mock');
NativeModules.RNGestureHandlerModule = {};
jest.mock('@react-native-async-storage/async-storage', () => mockAsyncStorage);
jest.mock('redux-persist', () => {
const real = jest.requireActual('redux-persist');
return {
...real,
persistReducer: jest.fn().mockImplementation((config, reducers) => reducers),
};
});