test_runner: t.after
should respect the first-in-last-out
principle like Golang's defer
#55853
Labels
feature request
Issues that request new features to be added to Node.js.
test_runner
Issues and PRs related to the test runner subsystem.
Version
v22.10.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
1. Create a test file
How often does it reproduce? Is there a required condition?
None
What is the expected behavior? Why is that the expected behavior?
t.after
should follow the first-in, last-out principleAccording to the above code, the file should be deleted first, then the directory
What do you see instead?
Additional information
the first-in-last-out
principle is more reasonable and practical. It is useful in many scenarios.I'm not sure why it was designed in the form of a queue. Is there anything special about it?
The text was updated successfully, but these errors were encountered: