mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
20 lines
643 B
TypeScript
20 lines
643 B
TypeScript
import { defaultTestOptions, tempData } from "../ws/start_bot.ts";
|
|
import { assertEquals } from "../deps.ts";
|
|
import { cache } from "../../src/cache.ts";
|
|
import { delayUntil } from "../util/delay_until.ts";
|
|
import { getEmojis } from "../../src/helpers/mod.ts";
|
|
|
|
Deno.test({
|
|
name: "[emoji] get emojis",
|
|
async fn() {
|
|
cache.guilds.get(tempData.guildId)?.emojis?.clear();
|
|
|
|
await getEmojis(tempData.guildId);
|
|
|
|
await delayUntil(10000, () => cache.guilds.get(tempData.guildId)?.emojis?.size > 0);
|
|
|
|
assertEquals(cache.guilds.get(tempData.guildId)?.emojis?.size > 0, true);
|
|
},
|
|
...defaultTestOptions,
|
|
});
|