Skip to content

Commit

Permalink
add jest mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
briansztamfater committed Jul 28, 2023
1 parent 7c1315d commit bdff78c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/jest/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
},
testTimeout: 60000,
transformIgnorePatterns: [
'/node_modules/(?!(@react-native|react-native-haptic-feedback|react-native-redash|react-native-image-crop-picker|@react-native-community|react-native-linear-gradient|react-native-background-timer|react-native|rn-emoji-keyboard|react-native-languages|react-native-shake|react-native-reanimated|react-native-redash|react-native-permissions|@react-native-community/blur|react-native-static-safe-area-insets)/).*/',
'/node_modules/(?!(@react-native|react-native-haptic-feedback|react-native-redash|react-native-image-crop-picker|@react-native-community|react-native-linear-gradient|react-native-background-timer|react-native|rn-emoji-keyboard|react-native-languages|react-native-shake|react-native-reanimated|react-native-redash|react-native-permissions|@react-native-community/blur|react-native-static-safe-area-insets|react-native-gifted-charts)/).*/',
],
globals: {
__TEST__: true,
Expand Down
7 changes: 7 additions & 0 deletions test/jest/jestSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ jest.mock('react-native-blob-util', () => ({

jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));

jest.mock('react-native-gifted-charts', () => ({
BarChart: {},
PieChart: {},
LineChart: {},
LineChartBicolor: {}
}));

NativeModules.ReactLocalization = {
language: 'en',
locale: 'en',
Expand Down

0 comments on commit bdff78c

Please sign in to comment.