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

style(tests): apply imperative styles to all tests to be consistent #559

Conversation

LauraBeatris
Copy link
Contributor

What:

Why: As mentioned by @ph-fritsche in #558, this repo follows the imperative style. There are files using a mix of declarative and imperative test descriptions, we should be consistent and use imperative style in all tests.

How: Replace declarative style with imperative style

Checklist:

  • Documentation
  • Tests
  • Typings
  • Ready to be merged

@LauraBeatris
Copy link
Contributor Author

Is there a way that we can avoid contributors to use declarative style? For instance, some kind of lint rule of leaving it explicit in the docs

@LauraBeatris LauraBeatris deleted the pr/fix-mix-of-test-styles branch February 19, 2021 13:53
@ph-fritsche
Copy link
Member

Just checked it: Actually nothing mentioned in the guideline. Guess it's just that everybody used that imperative style around here recently. I guess everybody just brings their style and each suite reflects who contributed most/first to it.

But I like the changes. I think the reports are better to read. And it's consistent with the commit messages where we squash and apply imperative style.
So a fix and the test it brings with it should sound at least about the same.

@ph-fritsche
Copy link
Member

Is there a way that we can avoid contributors to use declarative style? For instance, some kind of lint rule of leaving it explicit in the docs

On a second thought:
Ruling out declarative style might need a lot of discussion.
So it('clicks some object') will have to stay.
Getting rid of superfluous it('should click some object') on the other hand might be something everybody could get behind and that is easier to enforce in linting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants