-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Description
Version
v21.7.0
Platform
n/a
Subsystem
test_runner
What steps will reproduce the bug?
import { once } from 'node:events'
import { createServer } from 'node:http'
import { test } from 'node:test'
test('after is called', async (t) => {
const server = createServer((req, res) => res.end())
.listen(0)
t.after(() => {
console.log('Called!')
server.close()
})
await once(server, 'listening')
await fetch(`http://localhost:${server.address().port}`)
})
node --test test.mjs
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
No response
What do you see instead?
the test hangs, "Called!" is never printed to the console
Additional information
It could be caused by #51389?
Uzlopak and metcoder95
Metadata
Metadata
Assignees
Labels
test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.