Replies: 4 comments
-
What does this have todo with the coding-rules? Maybe belongs in another repo? |
Beta Was this translation helpful? Give feedback.
-
I think it is as relevant to discuss as all the other style rules we are covering in this repo. Just because it doesn't have an analyzer that can detect if we are doing it right, we can still use this repo to document how we like to write our test names. And test names are super important to get consistent, as they make it much easier to understand- and reason about a test. |
Beta Was this translation helpful? Give feedback.
-
@egil The "How we name our tests" belongs to another forum, unless you can point out a rule in one of the Otherwise I will close this issue after x-mas. |
Beta Was this translation helpful? Give feedback.
-
Let's discuss this in the next code jam meeting. As I've already stated, i think topics like this fits perfectly in here. |
Beta Was this translation helpful? Give feedback.
-
The name of our tests is one of the most important parts of writing tests, thus, I think it would be good to have a general convention for how we write the names of our tests.
My own preference is to be as wordy as needed, but no more than needed, and follow the given - when - then pattern, mostly without using those words, e.g. for a test of a simple add method on a calculator:
add called with a and b results in a plus b
(this would perhaps be a theory).Beta Was this translation helpful? Give feedback.
All reactions