enzyme-adapter-react-17 icon indicating copy to clipboard operation
enzyme-adapter-react-17 copied to clipboard

React.Suspense only renders the first child in Enzyme.

Open cnzh2992 opened this issue 2 years ago • 1 comments

Hi, I tried to test on a component with multiple children wrapped in <Suspense />, like:

<Suspense fallback={...}>
  <div />
  <div />
  <div />
</Suspense>

Only the first div rendered in test framework.

Here's the reproduction link. It looks good on browser and React Testing Framework but failed on Enzyme. Is it a bug of React 17 adapter?

cnzh2992 avatar Nov 12 '21 07:11 cnzh2992

Looks like a bug indeed.

Note to self: Might be related to https://github.com/enzymejs/enzyme/pull/2430#issuecomment-718957496

wojtekmaj avatar Nov 14 '21 19:11 wojtekmaj