diff --git a/src/discord/monitor.slash.test.ts b/src/discord/monitor.slash.test.ts index 86631a2c27..508ee5a936 100644 --- a/src/discord/monitor.slash.test.ts +++ b/src/discord/monitor.slash.test.ts @@ -3,24 +3,19 @@ import { createReplyDispatcherWithTyping } from "../auto-reply/reply/reply-dispa const dispatchMock = vi.fn(); -vi.mock("@buape/carbon", () => ({ - ChannelType: { DM: "dm", GroupDM: "group" }, - MessageType: { - ChatInputCommand: 1, - ContextMenuCommand: 2, - Default: 0, - }, - Button: class {}, - Command: class {}, - Client: class {}, - MessageCreateListener: class {}, - MessageReactionAddListener: class {}, - MessageReactionRemoveListener: class {}, - PresenceUpdateListener: class {}, - Row: class {}, - StringSelectMenu: class {}, - BaseMessageInteractiveComponent: class {}, -})); +vi.mock("@buape/carbon", async (importOriginal) => { + const actual = await importOriginal(); + return { + ...actual, + ChannelType: { DM: "dm", GroupDM: "group" }, + MessageType: { + ChatInputCommand: 1, + ContextMenuCommand: 2, + Default: 0, + }, + Client: class {}, + }; +}); vi.mock("../auto-reply/dispatch.js", async (importOriginal) => { const actual = await importOriginal();