mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
23 lines
623 B
TypeScript
23 lines
623 B
TypeScript
import { cache } from "../../src/cache.ts";
|
|
import { getChannels } from "../../src/helpers/channels/get_channels.ts";
|
|
import { assertEquals } from "../deps.ts";
|
|
import { delayUntil } from "../util/delay_until.ts";
|
|
import { defaultTestOptions, tempData } from "../ws/start_bot.ts";
|
|
|
|
Deno.test({
|
|
name: "[channel] get channels.",
|
|
async fn() {
|
|
cache.channels.clear();
|
|
|
|
// Delete the channel now without a reason
|
|
await getChannels(tempData.guildId);
|
|
await delayUntil(3000, () => cache.channels.size > 0);
|
|
|
|
assertEquals(
|
|
cache.channels.size > 0,
|
|
true,
|
|
);
|
|
},
|
|
...defaultTestOptions,
|
|
});
|