2021-10-06 20:47:50 +00:00
|
|
|
import '@testing-library/jest-native/extend-expect'
|
|
|
|
import moment from 'moment'
|
|
|
|
import 'moment/locale/sv'
|
|
|
|
import 'react-native-gesture-handler/jestSetup'
|
2021-03-30 18:54:28 +00:00
|
|
|
|
|
|
|
moment.locale('sv')
|
2021-02-23 08:38:01 +00:00
|
|
|
|
2021-02-16 15:48:40 +00:00
|
|
|
// Silence useNativeDriver error
|
2021-03-29 12:37:13 +00:00
|
|
|
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper')
|
2021-06-16 12:10:06 +00:00
|
|
|
|
|
|
|
jest.mock('react-native-reanimated', () => {
|
2021-10-06 20:47:50 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
2021-06-16 12:10:06 +00:00
|
|
|
const Reanimated = require('react-native-reanimated/mock')
|
|
|
|
|
|
|
|
// The mock for `call` immediately calls the callback which is incorrect
|
|
|
|
// So we override it with a no-op
|
2021-10-06 20:47:50 +00:00
|
|
|
Reanimated.default.call = () => {
|
|
|
|
// noop
|
|
|
|
}
|
2021-06-16 12:10:06 +00:00
|
|
|
|
|
|
|
return Reanimated
|
|
|
|
})
|