-
Notifications
You must be signed in to change notification settings - Fork 11
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
Repeat _each / _test hooks #164
Conversation
ff15fb0
to
740335f
Compare
test/hooks_test.lua
Outdated
t.assert_equals(hooks, { | ||
'before_each', 'before_test', 'test_a', 'after_each', | ||
'before_each', 'before_test', 'test_a', 'after_each', | ||
'before_each', 'test_b', 'after_test', 'after_each', | ||
'before_each', 'test_b', 'after_test', 'after_each', | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you like to extend it with before_all and after_all?
Also, are there tests that cover:
- an error in
before_each
in conjunction with--repeat
option - a case when n-th test fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you like to extend it with before_all and after_all?
I don't think that repeating _all
hooks is a good idea. They are supposed to be before and after all tests (evidently), but with the repeat option it won't be this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean calling before_all
twice but extending the test with it. Never mind, you can merge it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. Added it to the test
740335f
to
ace63c8
Compare
ace63c8
to
48f435b
Compare
Repeat
_each
and_test
hooks when-r
option is specified.I didn't forget about
DocumentationClose #161