mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
test: attempt to fix "Token not provided" error (#384)
* test: fix "Token not provided" error
* idk wtf
* Revert "idk wtf"
This reverts commit 26063aa127.
* https://open.spotify.com/track/3ZWc3Bm8eUMRRJhSWKHHeV 🔥🔥
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -10,6 +10,6 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denolib/setup-deno@v2
|
||||
- name: Run test script
|
||||
run: deno test --allow-net --allow-env
|
||||
run: deno test --allow-net --allow-env tests/
|
||||
env:
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
|
||||
@@ -6,6 +6,11 @@ if (!token) throw new Error("Token is not provided");
|
||||
startBot({
|
||||
token,
|
||||
intents: [Intents.GUILD_MESSAGES, Intents.GUILDS],
|
||||
eventHandlers: {
|
||||
debug(data) {
|
||||
console.log(Deno.inspect(data, { depth: 1 }));
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Default options for tests
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defaultTestOptions, tempData } from "./01_main.ts";
|
||||
import { defaultTestOptions, tempData } from "./01_main.test.ts";
|
||||
import { assertExists, createServer, delay, Guild } from "./deps.ts";
|
||||
|
||||
Deno.test({
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defaultTestOptions, tempData } from "./01_main.ts";
|
||||
import { defaultTestOptions, tempData } from "./01_main.test.ts";
|
||||
import {
|
||||
assertEquals,
|
||||
assertExists,
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Channel } from "../src/api/structures/mod.ts";
|
||||
import { defaultTestOptions, tempData } from "./01_main.ts";
|
||||
import { defaultTestOptions, tempData } from "./01_main.test.ts";
|
||||
import {
|
||||
assertEquals,
|
||||
assertExists,
|
||||
cache,
|
||||
Channel,
|
||||
channelOverwriteHasPermission,
|
||||
createGuildChannel,
|
||||
delay,
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defaultTestOptions, tempData } from "./01_main.ts";
|
||||
import { defaultTestOptions, tempData } from "./01_main.test.ts";
|
||||
import { assertEquals, assertExists, getMessage, sendMessage } from "./deps.ts";
|
||||
|
||||
Deno.test({
|
||||
@@ -1,8 +1,8 @@
|
||||
import { deleteMessageByID } from "../src/api/handlers/message.ts";
|
||||
import { defaultTestOptions, tempData } from "./01_main.ts";
|
||||
import { defaultTestOptions, tempData } from "./01_main.test.ts";
|
||||
import {
|
||||
assertEquals,
|
||||
deleteChannel,
|
||||
deleteMessageByID,
|
||||
deleteRole,
|
||||
deleteServer,
|
||||
} from "./deps.ts";
|
||||
@@ -1,6 +0,0 @@
|
||||
import "./01_main.ts";
|
||||
import "./02_guild.ts";
|
||||
import "./03_role.ts";
|
||||
import "./04_channel.ts";
|
||||
import "./05_message.ts";
|
||||
import "./06_cleanup.ts";
|
||||
Reference in New Issue
Block a user