From 19c89dd1c1bdd2cbc700113833e2d9d8a2c1bfce Mon Sep 17 00:00:00 2001 From: LTS20050703 Date: Sat, 24 Sep 2022 00:04:04 +0700 Subject: [PATCH] tests: rate limit test (#2485) * tests: rate limit test * tests/misc: rateLimit.test promise.all --- tests/misc/rateLimit.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/misc/rateLimit.test.ts diff --git a/tests/misc/rateLimit.test.ts b/tests/misc/rateLimit.test.ts new file mode 100644 index 000000000..2c0cc0dda --- /dev/null +++ b/tests/misc/rateLimit.test.ts @@ -0,0 +1,9 @@ +import { loadBot } from "../mod.ts"; +import { CACHED_COMMUNITY_GUILD_ID } from "../utils.ts"; + +Deno.test("[Misc] Rate Limit Test", async () => { + const bot = loadBot(); + const channel = await bot.helpers.createChannel(CACHED_COMMUNITY_GUILD_ID); + await Promise.all(Array(10).map(() => bot.helpers.sendMessage(channel.id, { content: "Rate Limit Test" }))); + await bot.helpers.deleteChannel(channel.id); +});