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(valid-expect-in-promise): support awaited promises in arguments #936

Merged
merged 2 commits into from Oct 11, 2021

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Oct 11, 2021

Fixes #930

During this also found another bug, and though up two other cases: await within an array (which is an extension of this) and expect(promise).resolves/rejects (which is a bit of a special case but think we should be able to support it easily, and it forms a nice bridge over to valid-expect, which'll handle ensuring the expect is awaited).

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

👍

@G-Rath
Copy link
Collaborator Author

G-Rath commented Oct 11, 2021

I just realised I've missed a case in my logic: x.y.z() (CallExpression > MemberExpression > MemberExpression)

@SimenB
Copy link
Member

SimenB commented Oct 11, 2021

conflict 🙁

@G-Rath G-Rath force-pushed the valid-expect-in-promise-await-in-args branch from 7627d57 to aa6e687 Compare October 11, 2021 19:45
@SimenB SimenB merged commit bd2c33c into main Oct 11, 2021
@SimenB SimenB deleted the valid-expect-in-promise-await-in-args branch October 11, 2021 19:50
github-actions bot pushed a commit that referenced this pull request Oct 11, 2021
## [25.0.3](v25.0.2...v25.0.3) (2021-10-11)

### Bug Fixes

* **valid-expect-in-promise:** support awaited promises in arguments ([#936](#936)) ([bd2c33c](bd2c33c))
@github-actions
Copy link

🎉 This PR is included in version 25.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

[valid-expect-in-promise] Error is reported even though promise is awaited
2 participants