This commit is contained in:
ayntee
2020-11-04 07:17:01 -08:00
6 changed files with 33 additions and 47 deletions
+7 -7
View File
@@ -2,7 +2,6 @@ import { assert, assertEquals, delay } from "../deps.ts";
import {
botID,
cache,
Channel,
createClient,
createGuildChannel,
createGuildRole,
@@ -144,8 +143,8 @@ Deno.test({
Deno.test({
name: "edit a channel in a guild",
async fn() {
const channel = await editChannel(data.channelID, {
name: "edited channel",
await editChannel(data.channelID, {
name: "edited-channel",
overwrites: [
{
id: data.roleID,
@@ -154,11 +153,12 @@ Deno.test({
deny: ["USE_EXTERNAL_EMOJIS"],
},
],
}) as Channel;
});
// Wait 5 seconds for it to update
await delay(5000);
const editedChannel = await getChannel(data.channelID);
assert(channel);
assertEquals(editedChannel.name, "edited channel");
assertEquals(editedChannel.name, "edited-channel");
},
});
@@ -247,7 +247,7 @@ Deno.test({
Deno.test({
name: "exit the process forcefully after all the tests are done",
async fn() {
Deno.exit(1);
Deno.exit();
},
...testOptions,
});