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

Deep rendering of styled-components yields RenderedReactElementData, not RenderedReactElement #54

Open
gertsonderby opened this issue Nov 9, 2018 · 2 comments

Comments

@gertsonderby
Copy link

Using the "when deeply rendered" assertion on an element created with the styled-components library, v4+, fails in strange ways due to the result being misidentified as the RenderedReactElementData type. If (as is typical) another assertion follows this, no meaningful error is given, the assertion simply fails with no message, identifying a location in unexpected itself as the fault location.

It seems likely that this is due to styled-components v4 using React.forwardRef. This seems to foil the identification of RenderedReactElement types somehow.

@gertsonderby
Copy link
Author

I'll see if I can't set up a simple test case and PR it.

@gertsonderby
Copy link
Author

A test with a simple forwardRef'ed component worked just fine. It seems to be some other oddity of styled-components' rearing its head. >_<

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant