I believe this issue is related to https://github.com/airbnb/enzyme/issues/2006 not being fully fixed.
This issue only affects ReactWrapper, ShallowWrapper seems to work fine.
.html() doesn't show children created from functions when component is wrapped with fragment.
.html() returns exact markup if rendered children are either classes or functions.
https://codesandbox.io/s/032mpxq6rv
| library | version
| ------------------- | -------
| enzyme | 3.9.0
| react | 16.7.0
| react-dom | 16.7.0
| react-test-renderer |
| adapter (below) | 1.11.2
Tried a few enzyme-adapter-react-16 versions, looks like this issue is a regression 1.8.0 -> 1.9.0
Thanks, this was a very helpful repro.
@ljharb, as I can see, fix was released, but this test case still fails with [email protected]
Repro fork with updated adapter version
https://codesandbox.io/s/n9v3j8p164
@atsikov it has not yet been released in enzyme proper; it will be included in the next one.
v3.10.0 has now been released.
Most helpful comment
v3.10.0 has now been released.