From 92ff9380d38af7a7cde8f9f7c69430add05a4cb1 Mon Sep 17 00:00:00 2001 From: Starman <30315137+Starman3787@users.noreply.github.com> Date: Sat, 26 Oct 2024 14:00:20 +0100 Subject: [PATCH] fix tests --- test/Client.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Client.js b/test/Client.js index ec32eb81..4e8f3fd4 100644 --- a/test/Client.js +++ b/test/Client.js @@ -288,19 +288,19 @@ describe("Client", function () { }); expect(client.registerCommands).to.be.a("function"); }); - it("should throw an error if commands is not an array", function () { + it("should throw an error if commands is not an array", async function () { const client = new Client({ intents: INTENTS.GUILDS, }); - expect(() => client.registerCommands({})).to.throw( + await expect(client.registerCommands({})).to.be.rejectedWith( "GLUON: Commands is not an array of Command objects.", ); }); - it("should throw an error if commands is not an array of Command objects", function () { + it("should throw an error if commands is not an array of Command objects", async function () { const client = new Client({ intents: INTENTS.GUILDS, }); - expect(() => client.registerCommands([{}])).to.throw( + await expect(client.registerCommands([{}])).to.be.rejectedWith( "GLUON: Commands is not an array of Command objects.", ); });