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: prefer explicit assert should check if node property is accessed #52

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

thomaslombart
Copy link
Collaborator

In cases like expect(getBy("foo").bar), bar was considered as an identifier thus triggering the visited function (CallExpression Identifier) and reporting an error.

Instead of adding another check, the implementation is simpler: checking whether the node is at the top level or not (ExpressionStatement).

Closes #45

In cases like `expect(getBy("foo").bar)`, `bar` was considered as an identifier thus triggering the visited function (`CallExpression Identifier`) and reporting an error
. Instead of adding another check, the implementation is simpler: checking whether the node is at the top level or not (`ExpressionStatement`).
@thomaslombart thomaslombart self-assigned this Dec 10, 2019
Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

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

Someone is on fire 🔥

@Belco90 Belco90 merged commit 7b8c2c6 into master Dec 10, 2019
@Belco90 Belco90 deleted the fix/prefer-explicit-assert-property branch December 10, 2019 14:42
@Belco90
Copy link
Member

Belco90 commented Dec 10, 2019

🎉 This PR is included in version 1.3.4 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefer explicit assert should check if node property is accessed
2 participants