Files
openclaw/extensions/feishu/src/monitor.test-mocks.ts
ademczuk 53fd7f8163 fix(test): resolve Feishu hoisted mock export syntax error (#32128)
- Remove vi.hoisted() wrapper from exported mock in shared module
  (Vitest cannot export hoisted variables)
- Inline vi.hoisted + vi.mock in startup test so Vitest's per-file
  hoisting registers mocks before production imports

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:34:16 +00:00

13 lines
325 B
TypeScript

import { vi } from "vitest";
export const probeFeishuMock: ReturnType<typeof vi.fn> = vi.fn();
vi.mock("./probe.js", () => ({
probeFeishu: probeFeishuMock,
}));
vi.mock("./client.js", () => ({
createFeishuWSClient: vi.fn(() => ({ start: vi.fn() })),
createEventDispatcher: vi.fn(() => ({ register: vi.fn() })),
}));