Check the render method of QuickAction

Started 3 months ago by Dhanasekar in React Native

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components)...

Body

    Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.      

    Check the render method of `QuickAction`.

      88 |
      89 |     it('Profile - Customer Care renders Icon Component', () => {
    > 90 |         const { getByText } = render(
         |                                     ^
      91 |             <Provider store={store}>
      92 |                 <ThemeProvider theme={lightThemes}>
      93 |                     <SafeAreaProvider initialMetrics={safeAreaMetrics} >

      at createFiberFromTypeAndProps (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:17518:17)
      at createFiberFromElement (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:17544:15)
      at createChild (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5202:28)
      at reconcileChildrenArray (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5492:25)
      at reconcileChildFibers (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5884:16)
      at reconcileChildren (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:9096:28)
      at updateFragment (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:9418:3)
      at beginWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:11365:14)
      at performUnitOfWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15811:12)
      at workLoopSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15745:5)
      at renderRootSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15717:7)
      at performSyncWorkOnRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15422:20)
      at flushSyncCallbacks (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2597:22)
      at flushActQueue (node_modules/react/cjs/react.development.js:2667:24)
      at Object.act (node_modules/react/cjs/react.development.js:2521:11)
      at act (node_modules/@testing-library/react-native/src/render-act.ts:14:21)
      at renderInternal (node_modules/@testing-library/react-native/src/render.tsx:62:33)
      at renderInternal (node_modules/@testing-library/react-native/src/render.tsx:32:10)
      at Object.<anonymous> (src/screens/main/ProfileSection/CustomerCare/CustomerCare.test.tsx:90:37)
  • No one is replied to this thread yet. Be first to reply!