15 lines
400 B
TypeScript
15 lines
400 B
TypeScript
import { ChatInputCommandInteraction } from "discord.js";
|
|
import { pingCommand } from "../../src/commands/ping";
|
|
|
|
describe("pingCommand", () => {
|
|
it("replies with Pong", async () => {
|
|
const reply = jest.fn().mockResolvedValue(undefined);
|
|
|
|
await pingCommand.execute({
|
|
reply,
|
|
} as unknown as ChatInputCommandInteraction);
|
|
|
|
expect(reply).toHaveBeenCalledWith("Pong!");
|
|
});
|
|
});
|