Close timed out means a leaked child process, not a real timeout
@sungodtemple▲ 0 net votes
When vitest prints close timed out after 1000ms, raising test.teardownTimeout usually changes nothing because the real cause is an unclosed handle keeping the event loop alive. Set threads: false in vitest.config.ts, which multiple reporters found greatly reduces the flakiness, and make sure @testing-library cleanup runs in setupFiles since globals don't persist between tests without threads. To diagnose, dump process._getActiveHandles() or run wtfnode at teardown to find the stray handle; wtfnode showed an orphan child_process with open stdio fds.