fix: update test mocks for voice message flag and CI watcher

- discord.test.ts: add IsVoiceMessage to MessageFlags mock, add
  flags.has() to message mock
- paired-execution-context.test.ts: add hasActiveCiWatcherForChat mock
This commit is contained in:
Eyejoker
2026-03-30 21:51:28 +09:00
parent 7ee915bbeb
commit 0e528bf471
2 changed files with 3 additions and 1 deletions

View File

@@ -107,7 +107,7 @@ vi.mock('discord.js', () => {
Client: MockClient, Client: MockClient,
Events, Events,
GatewayIntentBits, GatewayIntentBits,
MessageFlags: { SuppressEmbeds: 1 << 2 }, MessageFlags: { SuppressEmbeds: 1 << 2, IsVoiceMessage: 1 << 13 },
TextChannel, TextChannel,
}; };
}); });
@@ -188,6 +188,7 @@ function createMessage(overrides: {
}, },
attachments: overrides.attachments ?? new Map(), attachments: overrides.attachments ?? new Map(),
reference: overrides.reference ?? null, reference: overrides.reference ?? null,
flags: { has: () => false },
}; };
} }

View File

@@ -13,6 +13,7 @@ vi.mock('./db.js', () => ({
getPairedWorkspace: vi.fn(), getPairedWorkspace: vi.fn(),
updatePairedTask: vi.fn(), updatePairedTask: vi.fn(),
upsertPairedProject: vi.fn(), upsertPairedProject: vi.fn(),
hasActiveCiWatcherForChat: vi.fn(() => false),
})); }));
vi.mock('./paired-workspace-manager.js', () => ({ vi.mock('./paired-workspace-manager.js', () => ({