validate cached guild

This commit is contained in:
Skillz4Killz
2021-04-09 15:34:59 +00:00
committed by GitHub
parent 8e1b119e6c
commit a297775144
+3 -1
View File
@@ -1,4 +1,4 @@
import { createGuild, delay } from "../../mod.ts";
import { cache, createGuild, delay } from "../../mod.ts";
import { defaultTestOptions, tempData } from "../ws/start_bot.ts";
import { assertEquals, assertExists } from "../deps.ts";
@@ -17,6 +17,8 @@ Deno.test({
// Delay the execution by 5 seconds to allow GUILD_CREATE event to be processed
await delay(5000);
if (!cache.guilds.has(guild.id)) throw new Error("The guild seemed to be created but it was not cached.");
},
...defaultTestOptions,
});