Execute onTestFinished
handlers in the reverse order they are scheduled in
#5529
Closed
4 tasks done
Labels
p3-minor-bug
An edge case that only affects very specific usage (priority)
Clear and concise description of the problem
Currently, it looks like
onTestFinished
runs as a FIFO queue:Output after test:
However, it seems to be more useful if those registrations are run in the reverse order they were scheduled in, so you can colocate setup and teardown code and never have to worry about the order of execution here:
Right now,
db.teardown()
gets called beforedb.dropTable()
, which causes an issue.Suggested solution
If the order the teardown functions are run in is reversed, this class of problems will disappear.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: