add role tests

This commit is contained in:
Skillz4Killz
2021-11-02 19:32:57 +00:00
committed by GitHub
parent 484857ef05
commit 300c760480
7 changed files with 225 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
import { Bot } from "../../../src/bot.ts";
import { Cache } from "../../../src/cache.ts";
import { assertEquals, assertExists } from "../../deps.ts";
export async function getRolesTest(bot: Bot<Cache>, guildId: bigint, t: Deno.TestContext) {
const roles = await bot.helpers.getRoles(guildId);
assertEquals(bot.cache.guilds.get(guildId)?.roles.size, roles.length);
}