5

I have a component that I'm dynamically loading

const Summary = loadable({ 
   loader: () => import( /* webpackChunkName: "summary" */ 'app/components/summary')
   resolveModule: module => module.default,
});

Problem: My module wasn't resolving correctly and hence the component didn't render on the screen.

Test: Component should render

While testing with jest, I'm getting either a timeout ( when using done ) or my component isn't loading in the first tick which causes the test case to fail.

brass monkey
  • 5,841
  • 10
  • 36
  • 61
Sahil Jain
  • 3,649
  • 2
  • 14
  • 16

0 Answers0