Skip to content

support unstable_Profiler #2054

@eps1lon

Description

@eps1lon

Current behavior

mounting a tree using React.unstable_Profiler throws
Enzyme Internal Error: unknown node with tag 12

https://codesandbox.io/s/jxjoj2p0v

Expected behavior

mount(<React.unstable_Profiler id="test" onRender={id => console.log(id)} />); does not throw

Your environment

API

  • shallow
  • mount
  • render

Version

library version
enzyme 3.9.0
react 16.8.4
react-dom 16.8.4
react-test-renderer 16.8.4
adapter (below) 1.11.2

Adapter

  • enzyme-adapter-react-16
  • enzyme-adapter-react-16.3
  • enzyme-adapter-react-16.2
  • enzyme-adapter-react-16.1
  • enzyme-adapter-react-15
  • enzyme-adapter-react-15.4
  • enzyme-adapter-react-14
  • enzyme-adapter-react-13
  • enzyme-adapter-react-helper
  • others ( )

As far as I can tell enzyme is simply not supporting this (yet). Happy to start working on a PR that adds this to the mount API.

I'm personally not that interested in shallow rendering. I guess we would need to establish first how the Profiler should work with shallow rendering.

This should also be included in #1553.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions