From 581c275adf04196b20805ba8c4c353d350e51752 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 18 May 2024 10:14:57 +0100 Subject: [PATCH] WIP: Start of rules command tests --- .../commands/__snapshots__/rules.test.ts.snap | 32 +++++++++++++++++++ tests/commands/rules.test.ts | 8 ++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/commands/__snapshots__/rules.test.ts.snap diff --git a/tests/commands/__snapshots__/rules.test.ts.snap b/tests/commands/__snapshots__/rules.test.ts.snap new file mode 100644 index 0000000..c613f4d --- /dev/null +++ b/tests/commands/__snapshots__/rules.test.ts.snap @@ -0,0 +1,32 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Constructor EXPECT properties to be set 1`] = ` +{ + "default_member_permissions": "8", + "default_permission": undefined, + "description": "Rules-related commands", + "description_localizations": undefined, + "dm_permission": undefined, + "name": "rules", + "name_localizations": undefined, + "nsfw": undefined, + "options": [ + { + "description": "Send the rules embeds for this server", + "description_localizations": undefined, + "name": "embeds", + "name_localizations": undefined, + "options": [], + "type": 1, + }, + { + "description": "Send the server verification embed button", + "description_localizations": undefined, + "name": "access", + "name_localizations": undefined, + "options": [], + "type": 1, + }, + ], +} +`; diff --git a/tests/commands/rules.test.ts b/tests/commands/rules.test.ts index 014c682..e3ba58a 100644 --- a/tests/commands/rules.test.ts +++ b/tests/commands/rules.test.ts @@ -1,9 +1,15 @@ +import Command from "../../src/commands/rules"; + beforeEach(() => { process.env = {}; }); describe('Constructor', () => { - test.todo('EXPECT properties to be set'); + test('EXPECT properties to be set', () => { + const command = new Command(); + + expect(command.CommandBuilder).toMatchSnapshot(); + }); }); describe('Execute', () => {