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

fix(act): async act detection #407

Merged
merged 1 commit into from
Jul 23, 2019

Conversation

threepointone
Copy link
Contributor

The previous version of async act detection left an open hanging act scope, which broke tests and expectations. This PR delays the detection until it's been called at least once.

I tested this with 16.8.6, and 0.0.0-b4178af81.

src/__tests__/old-act.js Show resolved Hide resolved
src/__tests__/old-act.js Show resolved Hide resolved
@alexkrolick alexkrolick changed the title fix async act detection fix(act): async act detection Jul 22, 2019
@threepointone threepointone force-pushed the fix-async-act branch 3 times, most recently from 89abc88 to 5817d0d Compare July 22, 2019 20:57
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Good progress I think!

.watchmanconfig Outdated Show resolved Hide resolved
src/__tests__/old-act.js Outdated Show resolved Hide resolved
src/__tests__/old-act.js Outdated Show resolved Hide resolved
@threepointone threepointone force-pushed the fix-async-act branch 2 times, most recently from 3d6c359 to 14d34e0 Compare July 22, 2019 21:35
src/act-compat.js Outdated Show resolved Hide resolved
kentcdodds
kentcdodds previously approved these changes Jul 22, 2019
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Looks great. Can't wait to drop all this code eventually 😅

@kentcdodds
Copy link
Member

I'd love to have one other approval on this before I merge 👍

@kentcdodds
Copy link
Member

P.S. Thanks a ton Sunil!

The previous version of async act detection left an open hanging act scope, which broke tests and expectations. This PR delays the detection until it's been called at least once.
@kentcdodds kentcdodds merged commit ffe2b79 into testing-library:master Jul 23, 2019
@kentcdodds
Copy link
Member

@all-contributors please add @threepointone for code and tests

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @threepointone! 🎉

@kentcdodds
Copy link
Member

@all-contributors, please add @gaearon for reviews

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @gaearon! 🎉

@kentcdodds
Copy link
Member

🎉 This PR is included in version 8.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bcarroll22
Copy link
Contributor

Little late to the game, sorry for that, I'm trying to figure out if this is something worth porting to NTL?

@kentcdodds
Copy link
Member

Probably

@ghengeveld
Copy link

@threepointone This change is causing an issue: #468

@threepointone threepointone deleted the fix-async-act branch August 29, 2019 16:41
lucbpz pushed a commit to lucbpz/react-testing-library that referenced this pull request Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants