jest: React 16.2.0 fragments do not work with snapshots

What is the current behaviour? If you create a component that returns a <React.Fragment/> somewhere within it, Jest reports TypeError: Cannot convert a Symbol value to a string when you shallow render it.

What is the expected behavior? The snapshot should be generated without an error.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (8 by maintainers)

Most upvoted comments

FYI for anyone looking at this, the real package causing me issues was jest-enzyme (https://github.com/blainekasten/enzyme-matchers), which recently merged my PR to update enzyme-to-json