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
T
Nikolai R Kristiansen 1c1a4b64ca ⬆️ Major bumps! Move to RN 0.59
- ⬆️ Bump all dependencies
- ⬆️ react-native 0.59.x using the the `react-native eject` method
- ⬆️ react 16.8.x
- ⬆️ react-navigation 3.x
- ⬆️ tipsi-stripe 7.x
- 📝 Add section on linking native dependencies to README
- 🔥 Remove bitrise android build support
- 🐛 Add a 10 second timeout to all API requests and stop persisting HTTP request state fixing requests hangs
2019-05-04 23:32:45 +02:00

16 lines
643 B
JavaScript

jest.doMock('tipsi-stripe', () => ({
setOptions: jest.fn(),
}));
jest.doMock('react-dom/server', () => {}, {virtual: true})
global.fetch = require('jest-fetch-mock');
// ref https://github.com/kmagiera/react-native-gesture-handler/issues/344#issuecomment-489208684
import { NativeModules } from 'react-native';
NativeModules.RNGestureHandlerModule = {};
// ref https://github.com/react-native-community/react-native-async-storage/blob/master/docs/Jest-integration.md
import mockAsyncStorage from '@react-native-community/async-storage/jest/async-storage-mock';
jest.mock('@react-native-community/async-storage', () => mockAsyncStorage);