tomzaku / react-native-shimmer-placeholder

Placeholder/ Skeleton of React Native
MIT License
1.06k stars 93 forks source link

jest test case failed #80

Open vijaygojiya opened 2 years ago

vijaygojiya commented 2 years ago

image

console.error Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `PanelListShimmer`.
    at PanelListShimmer
    at renderEmptyComponent
    at View
    at Component (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/jest/mockComponent.js:28:18)
    at RCTScrollView
    at Component (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/jest/mockNativeComponent.js:17:18)
    at ScrollViewMock (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/jest/mockScrollView.js:21:52)
    at VirtualizedListContextProvider (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/Libraries/Lists/VirtualizedListContext.js:92:3)
    at VirtualizedList (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/Libraries/Lists/VirtualizedList.js:680:29)
    at FlatList (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/Libraries/Lists/FlatList.js:407:36)
    at PanelList (/home/ics-016/Documents/ICS/revolt-summit/src/modules/home/views/PanelList.tsx:29:53)
    at View
    at Component (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/jest/mockComponent.js:28:18)
    at RCTScrollView
    at Component (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/jest/mockNativeComponent.js:17:18)
    at ScrollViewMock (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-native/jest/mockScrollView.js:21:52)
    at LinearGradient
    at Home (/home/ics-016/Documents/ICS/revolt-summit/src/modules/home/views/Home.tsx:33:11)
    at Provider (/home/ics-016/Documents/ICS/revolt-summit/node_modules/react-redux/lib/components/Provider.js:19:3)

  16 |         return (
  17 |           <View key={index}>
> 18 |             <ShimmerPlaceHolder
     |             ^
  19 |               key={index}
  20 |               style={[
  21 |                 styles.container,
Rohit-vinfotech commented 1 month ago

+1