Open ghost opened 5 years ago
Try this
jest.mock('react-native-vector-icons', () => {
return {
RNVectorIconsManager : jest.mock(),
createIconSetFromIcoMoon:jest.fn()
}});
Try this:
jest.mock("react-native", () => ({
NativeModules: {
RNVectorIconsManager: jest.mock()
},
...
Any updates on this?
Upgrading to the newest 9.x version solved this. But it also rendered all previous snapshots invalid. Because now:
- "fontFamily": "Ionicons"
+ "fontFamily": undefined
Was anyone able to resolve this?
OS: Mojave (10.14.6) Target Platform: iOS and Android React-native-vector-icons version: 6.4.2 React-Native: 0.59.9 Jest: 24.8.0
Description
I am trying to run test with jest and I am getting this error:
My mock for this issues is the following:
Demo
You can use https://snack.expo.io/ to create a demo that can help users to better understand your problem.