【发布时间】:2022-08-16 20:21:20
【问题描述】:
我的错误:
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)
我的预设:
projects: [
{ \"preset\": \"jest-expo/ios\" },
{ \"preset\": \"jest-expo/android\" },
{ \"preset\": \"jest-expo/web\" },
],
零件:
<LinearGradient
colors={colorsArray}
style={{
...uikitStyles.progressBar,
height: heightHandler(height).height,
backgroundColor: bgColor,
width: `${newWidth}%`,
}}
end={{ x: 1, y: 0 }}
testID=\"gradient-test\"
/>
我正在使用 \'@testing-library/react-native\' 编写测试用例,有人可以帮我吗?
标签: typescript react-native unit-testing jestjs expo