-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
--bail keep executing before/after hooks for remaining suites #937
Comments
there's a bit of debate about how this should behave, running afterEach and after would probably make the most sense |
Opps, now I see I was outdated (1.9.x instead of 1.12.x). I updated it now, this behavior has changed completely, now all hooks are ignored after the fail, even the beforeAfter / after related to the failed suite, which is surely bad. Agree with you on this, Is that right? |
Running I like this because it helps performance of my tests if I didn't have to run a full database rebuild to ensure any bailed tests data is cleaned up. I haven't seen a pull request for this, I could take a swing at it if no one else is interested. |
Hello, It seems after() afterAll are not called when using bail() and yes it is bad. We should fix it. |
I just ran into this. Using 1.9 and the behavior is exactly as described in the opening post here. What I would expect/wish to see when using --bail is:
The logic here is: no more tests are going to run (that's what |
When using
--bail
option I expect all my subsequent suites to be skipped, including all it's before/after hooks.The beforeEach/afterEach hooks is properly skipped, but the before/after ones keep being executed.
Test
Running
Output
The text was updated successfully, but these errors were encountered: