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