Reorganization of expect()
, amGoingTo()
, comment()
, wantTo()
#6146
ThomasLandauer
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
how to use these methods in Unit testing? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, there are 4 "comment" methods that all do (almost) the same:
-vvv
or--steps
)So I'm suggesting to drop the first 3 in favor of
comment()
. Reasons:comment
is self-explanatory in the sense that it gives you a hint where/how this will be displayed.amGoingTo
andexpectTo
are non-saying.$I->comment('I expect foo');
wantTo()
is not documentedΒ #6076 (comment)And then there's
wantTo()
which is inconsistently displayed when called multiple times:... leads to:
Having some way to add a comment to the test overview output is very handy. But
wantTo
is semantically the wrong term for it; and the$I->
syntax leads to unanswerable questions when called multiple times.Suggestions? Maybe an annotation above the function instead of a method within the function?
This would resolve #6076 and #6075
Beta Was this translation helpful? Give feedback.
All reactions