diff --git a/packages/host/directory-picker-native/tests/win32-dialog-bindings.spec.ts b/packages/host/directory-picker-native/tests/win32-dialog-bindings.spec.ts index 9403bb7e36..b8ff4c3f1a 100644 --- a/packages/host/directory-picker-native/tests/win32-dialog-bindings.spec.ts +++ b/packages/host/directory-picker-native/tests/win32-dialog-bindings.spec.ts @@ -271,9 +271,13 @@ describe('the worker entry over a mocked process boundary', () => { const installBoundary = (): { posted: { kind: string; message?: string }[] } => { const posted: { kind: string; message?: string }[] = [] process.env.DSH_DIALOG_TITLE = 'Pick' - ;(process as { send?: unknown }).send = (message: { kind: string }, callback?: () => void) => { + // Never invoke the post callback: it runs the worker's disconnect(), and + // this process is IPC-connected under the forks pool — severing vitest's + // own channel would kill the test worker. The real close lifecycle + // belongs to built-worker.e2e.ts. + ;(process as { send?: unknown }).send = (message: { kind: string }) => { posted.push(message) - callback?.() + return true } return { posted } }