You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should create a pattern to be easier to read unit testing on PRs (specially if you don't have all the context on the project), and it is difficult to solve this with linter, so it must be a guide with good practices also.
Describe the solution you'd like
Me and @klzns and most of inStore team like this pattern of arrange, act and assert to do unit testing:
Aligning describes based on a scenario (usually a predicate) and possible input values makes it easier to see new scenarios and read test output, for example:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is a discussion thread, the most voted option will be final. Thank you for your contributions.
What is to be discussed?
We should create a pattern to be easier to read unit testing on PRs (specially if you don't have all the context on the project), and it is difficult to solve this with linter, so it must be a guide with good practices also.
Describe the solution you'd like
Me and @klzns and most of inStore team like this pattern of arrange, act and assert to do unit testing:
https://xp123.com/articles/3a-arrange-act-assert/
https://martinfowler.com/articles/practical-test-pyramid.html#TestStructure
So instead of:
You reorganize to do like that:
Which is easier to read.
But we can create more nice patterns about this subject in this issue, not only the way you arrange it.
The text was updated successfully, but these errors were encountered: