-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjest.setup.js
More file actions
26 lines (23 loc) · 814 Bytes
/
jest.setup.js
File metadata and controls
26 lines (23 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* global jest */
// Mock react-native-reanimated
global._frameTimestamp = null;
jest.mock('react-native-reanimated', () => {
const Reanimated = require('react-native-reanimated/mock');
Reanimated.default.call = () => {};
return Reanimated;
});
// Mock react-native-svg
jest.mock('react-native-svg', () => {
const React = require('react');
return {
Svg: ({ children, ...props }) =>
React.createElement('Svg', props, children),
Path: (props) => React.createElement('Path', props),
Rect: (props) => React.createElement('Rect', props),
Circle: (props) => React.createElement('Circle', props),
Defs: ({ children, ...props }) =>
React.createElement('Defs', props, children),
Mask: ({ children, ...props }) =>
React.createElement('Mask', props, children),
};
});