You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use enzyme in our tests and it lets you use selectors like wrapper.find("MyComponent") but because of how react-with-styles renames the displayName we have to use wrapper.find("withStyles(MyComponent").
It is best to use wrapper.find() with a reference to the component instead of a string that describes the component (e.g. wrapper.find(MyComponent), not wrapper.find("MyComponent")). This will solve this problem for you when using any HOC, while also avoiding accidentally finding a different component than the one you expected that may have the same name.
We use enzyme in our tests and it lets you use selectors like
wrapper.find("MyComponent")
but because of how react-with-styles renames thedisplayName
we have to usewrapper.find("withStyles(MyComponent")
.The line causing this is here:
react-with-styles/src/withStyles.jsx
Line 62 in ea72776
Would you be open to merging something that would allow us to make this optional?
The text was updated successfully, but these errors were encountered: