card-drop/tests/__functions__/discord.js/GenerateCommandInteractionMock.ts
Ethan Lane 78963d6b7c
Some checks failed
Test / build (push) Failing after 46s
WIP: Start of drop command tests
2025-04-24 19:56:07 +01:00

17 lines
No EOL
484 B
TypeScript

import { CommandInteraction } from "../../__types__/discord.js";
export default function GenerateCommandInteractionMock(options?: {
subcommand?: string,
}): CommandInteraction {
return {
deferReply: jest.fn(),
editReply: jest.fn(),
isChatInputCommand: jest.fn().mockReturnValue(true),
options: {
getSubcommand: jest.fn().mockReturnValue(options?.subcommand),
},
user: {
id: "userId",
},
};
}