Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Testing expo-linear-gradient in react native ,throws TypeError: Cannot read property 'includes' of undefined

$
0
0

My Error:

 TypeError: Cannot read property 'includes' of undefined  at requireNativeViewManager (node_modules/expo-modules-core/src/NativeViewManagerAdapter.native.tsx:28:49)  at Object.<anonymous> (node_modules/expo-linear-gradient/src/NativeLinearGradient.android.tsx:49:34)  at Object.<anonymous> (node_modules/expo-linear-gradient/src/LinearGradient.tsx:4:1)

My Presets :

 projects: [{ "preset": "jest-expo/ios" },{ "preset": "jest-expo/android" },{ "preset": "jest-expo/web" },

],

Component:

<LinearGradient      colors={colorsArray}      style={{        ...uikitStyles.progressBar,        height: heightHandler(height).height,        backgroundColor: bgColor,        width: `${newWidth}%`,      }}      end={{ x: 1, y: 0 }}      testID="gradient-test"    />

Screen Shot of the error

Im using '@testing-library/react-native' to write the test cases, can someone help me with this?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>