test_runner: run afterEach for runtime t.skip() - #61525
Merged
Merged
Conversation
Collaborator
|
Review requested:
|
Member
|
This looks fine, but |
Contributor
Author
|
Thanks @ljharb. I see from tape-testing/tape#545 that in tape, |
cjihrig
approved these changes
Jan 26, 2026
Comment on lines
+32
to
+36
| process.on('exit', () => { | ||
| assert.strictEqual(beforeEachTotal, 2); | ||
| assert.strictEqual(afterEachRuntimeSkip, 1); | ||
| assert.strictEqual(afterEachTotal, 2); | ||
| }); |
Contributor
There was a problem hiding this comment.
Ensure afterEach runs when a test is skipped at runtime (t.skip()), while keeping static { skip: true } behavior unchanged.
Runtime t.skip() previously set skipped and prevented afterEach, even if beforeEach ran.
This left resources uncleaned and differed from user expectations.
Fixes: #61462