upgrade openclaw to 3.23 (#652)

Co-authored-by: Felix <24791380+vcfgv@users.noreply.github.com>
This commit is contained in:
paisley
2026-03-26 16:58:04 +08:00
committed by GitHub
Unverified
parent b786b773f1
commit ba5947e2cb
22 changed files with 2927 additions and 4739 deletions

View File

@@ -63,12 +63,29 @@ vi.mock('@electron/api/route-utils', () => ({
vi.mock('@electron/utils/paths', () => ({
getOpenClawConfigDir: () => testOpenClawConfigDir,
getOpenClawDir: () => testOpenClawConfigDir,
getOpenClawResolvedDir: () => testOpenClawConfigDir,
}));
vi.mock('@electron/utils/proxy-fetch', () => ({
proxyAwareFetch: (...args: unknown[]) => proxyAwareFetchMock(...args),
}));
// Stub openclaw SDK functions that are dynamically loaded via createRequire
// in the real code — the extracted utility module is easy to mock.
vi.mock('@electron/utils/openclaw-sdk', () => ({
listDiscordDirectoryGroupsFromConfig: vi.fn().mockResolvedValue([]),
listDiscordDirectoryPeersFromConfig: vi.fn().mockResolvedValue([]),
normalizeDiscordMessagingTarget: vi.fn().mockReturnValue(undefined),
listTelegramDirectoryGroupsFromConfig: vi.fn().mockResolvedValue([]),
listTelegramDirectoryPeersFromConfig: vi.fn().mockResolvedValue([]),
normalizeTelegramMessagingTarget: vi.fn().mockReturnValue(undefined),
listSlackDirectoryGroupsFromConfig: vi.fn().mockResolvedValue([]),
listSlackDirectoryPeersFromConfig: vi.fn().mockResolvedValue([]),
normalizeSlackMessagingTarget: vi.fn().mockReturnValue(undefined),
normalizeWhatsAppMessagingTarget: vi.fn().mockReturnValue(undefined),
}));
describe('handleChannelRoutes', () => {
beforeEach(() => {
vi.resetAllMocks();