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

[TestUtils.act] fix return result checking #14758

Merged
merged 36 commits into from
Feb 5, 2019

Conversation

threepointone
Copy link
Contributor

fixes a bug from #14744 where returning null from .act would throw when null. Sorry! Added a test to be sure.

@threepointone
Copy link
Contributor Author

doing a merge in with master, gimme a minute

@@ -397,7 +397,7 @@ const ReactTestUtils = {
if (__DEV__) {
if (result !== undefined) {
let addendum;
if (typeof result.then === 'function') {
if (result && typeof result.then === 'function') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super tiny nit result !== null && ...

@threepointone threepointone merged commit d1326f4 into facebook:master Feb 5, 2019
NMinhNguyen referenced this pull request in enzymejs/react-shallow-renderer Jan 29, 2020
* fix .act return value testing when result === null

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

Successfully merging this pull request may close these issues.

3 participants