rig-task-bot/test/modules/defaultCommand.spec.ts

25 lines
685 B
TypeScript
Raw Normal View History

2024-09-30 01:41:25 +00:00
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { describe, it, expect, vi } from "vitest";
import { defaultCommand } from "../../src/modules/defaultCommand.js";
describe("defaultCommand", () => {
it("should respond with expected values", async() => {
expect.assertions(1);
const mockInteraction = {
commandName: "test",
reply: vi.fn(),
};
await defaultCommand({} as never, mockInteraction as never);
expect(mockInteraction.reply, "should reply with correct body").
toHaveBeenCalledWith({
content: "Interaction test not found.",
ephemeral: true,
});
});
});