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

Prohibit tests in beforeEach etc. hook calls #174

Merged
merged 7 commits into from
Aug 13, 2018

Conversation

papandreou
Copy link
Contributor

@papandreou papandreou commented Aug 3, 2018

This is just a quick implementation to see if there's any interest. And yes, this actually happened :)

Questions:

  • Should this be a separate rule?
  • Is it a requirement to make sure that the error messages say eg. Unexpected test nested within a beforeEach hook. rather than Unexpected test nested within another test.?

@lo1tuma
Copy link
Owner

lo1tuma commented Aug 13, 2018

Hi @papandreou and thanks for your contribution.
I think this makes definitely sense to be added to this rule.

Regarding the error message it would be of course much better if the message could explain the actual problem as precisely as possible.

@papandreou
Copy link
Contributor Author

Hey @lo1tuma, thanks for the feedback. I've updated the PR so that separate error messages are issued, when it's a test nested within a hook, or a hook within a hook.

Copy link
Owner

@lo1tuma lo1tuma left a comment

Choose a reason for hiding this comment

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

Nice, LGTM.

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.

2 participants