import { vi } from "vitest"; export function createFeishuClientMockModule(): { createFeishuWSClient: () => { start: () => void; close: () => void }; createEventDispatcher: () => { register: () => void }; } { return { createFeishuWSClient: vi.fn(() => ({ start: vi.fn(), close: vi.fn() })), createEventDispatcher: vi.fn(() => ({ register: vi.fn() })), }; } export function createFeishuRuntimeMockModule(): { getFeishuRuntime: () => { channel: { debounce: { resolveInboundDebounceMs: () => number; createInboundDebouncer: () => { enqueue: () => Promise; flushKey: () => Promise; }; }; text: { hasControlCommand: () => boolean; }; }; }; } { return { getFeishuRuntime: () => ({ channel: { debounce: { resolveInboundDebounceMs: () => 0, createInboundDebouncer: () => ({ enqueue: async () => {}, flushKey: async () => {}, }), }, text: { hasControlCommand: () => false, }, }, }), }; }