File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
docs/docs-reanimated/docs/guides Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -111,10 +111,17 @@ More examples from `react-native-reanimated` repository:
111111- [ SharedValue.test.tsx] ( https://github.com/software-mansion/react-native-reanimated/tree/main/packages/react-native-reanimated/__tests__/SharedValue.test.tsx )
112112- [ Animation.test.tsx] ( https://github.com/software-mansion/react-native-reanimated/blob/main/packages/react-native-reanimated/__tests__/Animation.test.tsx )
113113
114+ ## Testing ` react-native-svg `
115+
116+ Because of how ` react-native-svg ` manages its props, you need to use the mock provided by Reanimated to enable testing:
117+
118+ ``` js
119+ jest .mock (' react-native-svg' , () => require (' react-native-reanimated/mock' ));
120+ ```
121+
114122## Remarks
115123
116124- Tests must run with Node 16 or newer.
117- - Testing ` react-native-svg ` props is not supported.
118125- If you have custom babel configuration for testing, make sure that Reanimated's babel plugin is enabled in that environment.
119126
120127## Recommended testing library
You can’t perform that action at this time.
0 commit comments