Add alias for ->expect() #1142
Closed
jwalton512
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I really like higher order tests. I often find myself writing tests like the following (especially in Laravel projects)
This works great, but the
->expect()
immediately followed by->assert...
feels odd.I find myself creating an alias, usually
->act()
(as in arrange, act, assert)Then in my test:
It's pretty simple to add this to each of my projects, but I think it could be a useful (and simple) feature to add in Pest
..or perhaps there already exists a better way to achieve what I'm doing.
Beta Was this translation helpful? Give feedback.
All reactions