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 no-setup-in-describe to correctly detect describe calls #196

Merged
merged 1 commit into from Jul 8, 2019

Conversation

lo1tuma
Copy link
Owner

@lo1tuma lo1tuma commented Jul 8, 2019

There was one call of astUtils.isDescribe which has been called without the second parameter which caused the function to accept undefined as a valid alias for suite function names. Additionally there are cases where we don’t get a node name for CallExpressions (e.g. foo()()). So in such cases the extracted node name is undefined and isDescribe will return true due to the above mentioned
bug.

Fixes: #172

There was one call of `astUtils.isDescribe` which has been called
without the second parameter which caused the function to accept
`undefined` as a valid alias for suite function names. Additionally
there are cases where we don’t get a node name for `CallExpressions`
(e.g. `foo()()`). So in such cases the extracted node name is
`undefined` and `isDescribe` will return true due to the above mentioned
bug.

Fixes: #172
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.

no-setup-in-describe aggressively pops its nesting
1 participant