Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support unstable_Profiler #2054

Closed
3 of 13 tasks
eps1lon opened this issue Mar 17, 2019 · 3 comments
Closed
3 of 13 tasks

support unstable_Profiler #2054

eps1lon opened this issue Mar 17, 2019 · 3 comments

Comments

@eps1lon
Copy link
Contributor

eps1lon commented Mar 17, 2019

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.

@ljharb
Copy link
Member

ljharb commented Mar 17, 2019

You’re correct, it doesn’t yet. A PR would be great!

@ljharb
Copy link
Member

ljharb commented Mar 17, 2019

(and yes, to be added to mount we’d need to decide what the behavior is for shallow, and ideally it’d be identical)

@ljharb
Copy link
Member

ljharb commented Apr 5, 2019

I'd say this is closed by #2055.

@ljharb ljharb closed this as completed Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants