In our react-native application, we are developing custom style component for our component.
The style component contains StyleSheet example:
export default StyleSheet.create({
container: {
flexGrow: 1,
justifyContent: "center",
alignItems: "center",
borderTopWidth: 1,
},
});
As this component is imported in our component and when we do unit testing of our component it goes 30 times in it and shows that if and else part were not run which leads to less coverage(style component is imported in the component)
So I have included a screenshot which explains the issue. Note that rest whole component is tested and fully covered. So the coverage which is left is for style component.