Closed
Labels
test_runnerIssues and PRs related to the test runner subsystem.
Description
Version
21.7.1
Platform
Darwin Kernel Version 22.6.0, arm64
Subsystem
test
What steps will reproduce the bug?
$ node --testMinimal repro: JakobJingleheimer/node-test-broadcastchannel@84b3de2
Minimal repro "fixed": JakobJingleheimer/node-test-broadcastchannel@9997b1e
How often does it reproduce? Is there a required condition?
100%
What is the expected behavior? Why is that the expected behavior?
node:test should kill the open broadcast channel when the tests finish (this is what every other test runner I know of does, ex vitest).
What do you see instead?
The command hangs indefinitely.
Additional information
This is especially relevant for tests of code that will run in a browser environment, where something like process.on('exit') doesn't exist, and the BroadcastChannel would not be manually closed (like it is in my "fixed" example above).
Metadata
Metadata
Assignees
Labels
test_runnerIssues and PRs related to the test runner subsystem.
Activity
MoLow commentedon Mar 13, 2024
@JakobJingleheimer this seems to duplicate #49925