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

Convention: Avoid Weasel Words #3

Open
stijn-dejongh opened this issue Sep 25, 2024 · 0 comments
Open

Convention: Avoid Weasel Words #3

stijn-dejongh opened this issue Sep 25, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@stijn-dejongh
Copy link
Member

Outline

Tests are often phrased using non-commital words such as "Should", "Could", ... .
The idea of a good test suite is to help reduce issues during development, and be used afterwards as 'executable documentation'. As such, the names of tests should be phrased in a way that reads like a list of capabilities, rather than a list of vague intentions.

No one would buy a car that is advertised to have the following function:

"When the user steps on the brakes, the car SHOULD slow down."

Implementation Notes

  • Use a configurable list of weasel words.
  • Scan the test code to ensure these words do not occur in the codebase.
  • Throw an error/warning if they are used with a clear description of the convention.
@stijn-dejongh stijn-dejongh self-assigned this Sep 25, 2024
@stijn-dejongh stijn-dejongh added the enhancement New feature or request label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant