-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
test_runner: fix ordering of test hooks #47931
test_runner: fix ordering of test hooks #47931
Conversation
Review requested:
|
please amend the commit message from |
For tests with subtests the before hook was being run after the beforeEach hook, which is the opposite to test suites and expectations. Also, a function was being used to close over the after hooks, but at the point it was being run the after hooks were not yet set up. Fixes nodejs#47915
f08f31f
to
3ae2015
Compare
I've updated the commit message. Thanks for the review. |
I can see that some of the Jenkins jobs are failing. Though I'm not sure why. Is there anything I can do to help this? |
that is not related to this PR, unfortunately there are some flaky tests |
Ah, fair enough. Thank you! |
Landed in 24615bd |
Thanks for the contribution @philnash 🎉 |
Thanks for the help getting this in @MoLow! |
For tests with subtests the before hook was being run after the beforeEach hook, which is the opposite to test suites and expectations. Also, a function was being used to close over the after hooks, but at the point it was being run the after hooks were not yet set up. Fixes #47915 PR-URL: #47931 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
For tests with subtests the before hook was being run after the beforeEach hook, which is the opposite to test suites and expectations. Also, a function was being used to close over the after hooks, but at the point it was being run the after hooks were not yet set up. Fixes #47915 PR-URL: #47931 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
For tests with subtests the before hook was being run after the beforeEach hook, which is the opposite to test suites and expectations. Also, a function was being used to close over the after hooks, but at the point it was being run the after hooks were not yet set up. Fixes nodejs#47915 PR-URL: nodejs#47931 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
For tests with subtests the before hook was being run after the beforeEach hook, which is the opposite to test suites and expectations.
Also, a function was being used to close over the after hooks, but at the point it was being run the after hooks were not yet set up.
Fixes #47915