From 16d10245df70de1f921ff3b8a7a9fa91a8a245d0 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Fri, 12 Nov 2021 22:13:18 +0000 Subject: [PATCH] fix: enable cache plugin in tests --- tests/deps.ts | 1 + tests/mod.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/deps.ts b/tests/deps.ts index da1c2c2ba..27f25474c 100644 --- a/tests/deps.ts +++ b/tests/deps.ts @@ -5,3 +5,4 @@ export { assertNotEquals, assertThrows, } from "https://deno.land/std@0.113.0/testing/asserts.ts"; +export * from "https://deno.land/x/discordeno_cache_plugin@0.0.3/mod.ts"; diff --git a/tests/mod.ts b/tests/mod.ts index b563f42fe..9b8843f5a 100644 --- a/tests/mod.ts +++ b/tests/mod.ts @@ -5,10 +5,11 @@ import { createEventHandlers, DiscordChannelTypes, DiscordOverwriteTypes, + setupBot, startBot, stopBot, } from "../mod.ts"; -import { assertEquals, assertExists } from "./deps.ts"; +import { assertEquals, assertExists, enableCachePlugin } from "./deps.ts"; import { deleteMessageWithReasonTest, deleteMessageWithoutReasonTest } from "./helpers/messages/delete_message.ts"; import { getMessagesTest } from "./helpers/messages/get_messages.ts"; import { deleteMessagesWithoutReasonTest, deleteMessagesWithReasonTest } from "./helpers/messages/delete_messages.ts"; @@ -91,7 +92,8 @@ Deno.test({ isAsync: false, }, }); - + setupBot(bot); + enableCachePlugin(bot); await startBot(bot); // Delay the execution to allow READY events to be processed