Add constructor test
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Ethan Lane 2023-03-25 15:16:01 +00:00
parent d26f0d98d2
commit bd5515c587
3 changed files with 950 additions and 940 deletions

View file

@ -0,0 +1,16 @@
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);
});
});