vylbot-app/tests/commands/timeout.test.ts
Ethan Lane bd5515c587
Some checks failed
continuous-integration/drone/push Build is failing
Add constructor test
2023-03-25 15:16:01 +00:00

16 lines
625 B
TypeScript

import { PermissionsBitField, SlashCommandBuilder } from "discord.js";
import Timeout from "../../src/commands/timeout";
describe('Constructor', () => {
test('Expect CommandBuilder to be configured', () => {
const command = new Timeout();
expect(command.CommandBuilder).toBeDefined();
const commandBuilder = command.CommandBuilder as SlashCommandBuilder;
expect(commandBuilder.name).toBe("timeout");
expect(commandBuilder.description).toBe("Timeouts a user out, sending them a DM with the reason if possible");
expect(commandBuilder.options.length).toBe(3);
});
});