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

Don't trigger the footgun protection when a promise is .then()ed but not fully awaited #622

Merged
merged 2 commits into from Apr 22, 2019

Conversation

@papandreou
Copy link
Member

papandreou commented Apr 21, 2019

Eg. via expect.promise.any

Fixes the flaky doc test: example #2 (documentation/api/promise-any.md:39:1) should succeed

#621 (comment)

…not fully awaited

Eg. via expect.promise.any

Fixes the flaky doc test "example #2 (documentation/api/promise-any.md:39:1) should succeed"

#621 (comment)
@papandreou papandreou self-assigned this Apr 21, 2019
@alexjeffburke

This comment has been minimized.

Copy link
Member

alexjeffburke commented Apr 21, 2019

This looks like a pretty incredible catch. Do we think this would also affect .race() if we immediately resolved and if so would it be worth adding a test for that too?

papandreou added a commit that referenced this pull request Apr 21, 2019
@papandreou

This comment has been minimized.

Copy link
Member Author

papandreou commented Apr 21, 2019

Yeah, it fixes the same thing for race. Added a test for that in 2736df0 now :)

@papandreou papandreou force-pushed the fix/footgunPromiseAny branch from 2561e2f to 2736df0 Apr 21, 2019
@alexjeffburke

This comment has been minimized.

Copy link
Member

alexjeffburke commented Apr 22, 2019

LGTM

Copy link
Member

sunesimonsen left a comment

Great

@papandreou papandreou merged commit cbe5b25 into master Apr 22, 2019
8 checks passed
8 checks passed
Header rules No header rules processed
Details
Pages changed 1 new file uploaded
Details
Redirect rules No redirect rules processed
Details
Mixed content No mixed content detected
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 97.987%
Details
deploy/netlify Deploy preview ready!
Details
@papandreou papandreou deleted the fix/footgunPromiseAny branch Apr 22, 2019
papandreou referenced this pull request Apr 22, 2019
Disallow .hook() on a frozen expect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.