[enzyme-adapter-react-{16,16.3}] [fix] forwardRef: respect .displayName#1817
[enzyme-adapter-react-{16,16.3}] [fix] forwardRef: respect .displayName#1817
forwardRef: respect .displayName#1817Conversation
…yName` on the forwardRef Fixes #1810.
jgzuke
left a comment
There was a problem hiding this comment.
Is it worth testing the .find() behaviour as seen in the original ticket
Out of curiosity, why are 16.1 and 16.2 adapters missing a bunch of special cases in displayNameOfNode that exist in 16.0 or 16.3 (https://github.com/airbnb/enzyme/blob/master/packages/enzyme-adapter-react-16/src/ReactSixteenAdapter.js#L442 vs https://github.com/airbnb/enzyme/blob/master/packages/enzyme-adapter-react-16.1/src/ReactSixteenOneAdapter.js#L420)?
|
@jgzuke because the 16 adapter is for 16.0 - 16.5, but the 16.3 adapter is only for 16.3, and those special cases are only in 16.3+. |
|
I don't think it's really worth it; the original issue's repro requires styled-components, but in general, if it shows up in |
dafe529 to
d2c06d9
Compare
|
Thanks Jordan! |
|
Hello there! Will it be released anytime soon? |
- [new] add `isCustomComponentElement` (#1832) - [fix] (<= v16.2) ensure that `this.state` starts out `null` when unspecified on a custom component (#1849) - [fix] `forwardRef`: respect `.displayName` on the forwardRef (#1817) - [deps] update `babel-preset-airbnb`, `chai`, `eslint`, `mocha`, `enzyme-adapter-utils`, `react-is`, `airbnb-js-shims`
Fixes #1810.