card-drop/tests/__functions__/discord.js/GenerateCommandInteractionMock.ts

12 lines
370 B
TypeScript
Raw Normal View History

2025-02-06 19:33:54 +00:00
import { CommandInteraction } from "../../__types__/discord.js";
export default function GenerateCommandInteractionMock(options?: {
subcommand?: string,
}): CommandInteraction {
return {
isChatInputCommand: jest.fn().mockReturnValue(true),
options: {
getSubcommand: jest.fn().mockReturnValue(options?.subcommand),
},
};
}