Skip to content

[TestUtils.act] fix return result checking #14758

Merged
threepointone merged 36 commits intofacebook:masterfrom
threepointone:flush-sync-effects
Feb 5, 2019
Merged

[TestUtils.act] fix return result checking #14758
threepointone merged 36 commits intofacebook:masterfrom
threepointone:flush-sync-effects

Conversation

@threepointone
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

doing a merge in with master, gimme a minute

if (result !== undefined) {
let addendum;
if (typeof result.then === 'function') {
if (result && typeof result.then === 'function') {
Copy link
Copy Markdown
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