Skip to content

WIP: Test failures with React 16 #207

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

Closed
wants to merge 1 commit into from

Conversation

jochenberger
Copy link
Contributor

Some tests start to fail with React 16.

@jochenberger
Copy link
Contributor Author

I'll disable the Modal tests, we're addressing that issue in #201.

@jochenberger jochenberger force-pushed the patch-1 branch 2 times, most recently from 48ab346 to 561ede4 Compare September 27, 2017 06:39
@jochenberger jochenberger mentioned this pull request Sep 28, 2017
@jochenberger jochenberger force-pushed the patch-1 branch 2 times, most recently from ba5513b to 37c92ce Compare September 28, 2017 07:10
@jochenberger
Copy link
Contributor Author

I stole the error boundary part from #208. Unfortunately, it doesn't work with React 15 yet. I guess the unstable_handleError does not prevent the error from being thrown. Is this even relevant or will you upgrade to 16 anyway?

@jquense
Copy link
Member

jquense commented Oct 2, 2017

We can just update the dev dep to 16 for this I think. Does the error boundary approach work?

@taion
Copy link
Member

taion commented Oct 3, 2017

We'd need to add an assertion on the number of expect calls triggered.

That or save off the exception and do the checking outside render (does that work given that render is potentially async?).

Otherwise those test cases would pass even if the error is not thrown.

@jochenberger
Copy link
Contributor Author

@jquense, unfortunately, it doesn't seem as if the approach works.

@jquense
Copy link
Member

jquense commented Oct 4, 2017

some more context facebook/react#10474 (comment)

@taion
Copy link
Member

taion commented Oct 4, 2017

If we're not testing lifecycle handling here, can we just use the SSR API? That still throws normally, right?

@jochenberger
Copy link
Contributor Author

I can't get it to work with React 16. It seems as if componentDidCatch is never called. The behavior with react-dom/server is basically the same.

@taion
Copy link
Member

taion commented Oct 6, 2017

Doesn't it explicitly throw a normal JS exception with react-dom/server?

@jochenberger
Copy link
Contributor Author

Closing in favor of #216

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

Successfully merging this pull request may close these issues.

3 participants