mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
validate cached guild
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user