From c87f4f80009d52f0c75048a383d9b9da7a7984f6 Mon Sep 17 00:00:00 2001 From: ayntee Date: Wed, 27 Jan 2021 22:20:30 +0400 Subject: [PATCH] test: move token to main test --- test/mod.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/mod.test.ts b/test/mod.test.ts index 3bce67368..15fca7706 100644 --- a/test/mod.test.ts +++ b/test/mod.test.ts @@ -32,9 +32,6 @@ import { unpin, } from "./deps.ts"; -const token = Deno.env.get("DISCORD_TOKEN"); -if (!token) throw new Error("Token is not provided"); - // Default options for tests export const defaultTestOptions: Partial = { sanitizeOps: false, @@ -54,6 +51,9 @@ export const tempData = { Deno.test({ name: "[main] connect to gateway", async fn() { + const token = Deno.env.get("DISCORD_TOKEN"); + if (!token) throw new Error("Token is not provided"); + await startBot({ token, intents: ["GUILD_MESSAGES", "GUILDS"],