Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Oct 26, 2024
1 parent bfc0420 commit 92ff938
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
);
});
Expand Down

0 comments on commit 92ff938

Please sign in to comment.