card-drop/tests/__functions__/discord.js/GenerateButtonInteractionMock.ts
Ethan Lane f745fdfbca
Some checks failed
Test / build (push) Failing after 39s
WIP: Start creating tests for confirmation button event
2025-02-19 18:40:59 +00:00

23 lines
No EOL
603 B
TypeScript

import { ButtonInteraction } from "../../__types__/discord.js";
export default function GenerateButtonInteractionMock(): ButtonInteraction {
return {
guild: {},
guildId: "guildId",
channel: {
isSendable: jest.fn().mockReturnValue(true),
send: jest.fn(),
},
deferUpdate: jest.fn(),
editReply: jest.fn(),
message: {
createdAt: new Date(1000 * 60 * 27),
},
user: {
id: "userId",
},
customId: "customId",
update: jest.fn(),
reply: jest.fn(),
};
}