fix: remove cloneChannel helper

This commit is contained in:
Skillz4Killz
2021-12-03 14:11:43 +00:00
committed by GitHub
parent 69230ae78e
commit 7c171faf3c
4 changed files with 0 additions and 72 deletions
-23
View File
@@ -1,23 +0,0 @@
import { DiscordenoChannel } from "../../../src/transformers/channel.ts";
import { assertExists, assertEquals } from "../../deps.ts";
import { bot, channel } from "../../mod.ts";
import { delayUntil } from "../../utils.ts";
export async function cloneChannelTests(
options: { reason?: string },
) {
// @ts-ignore for itoh
const cloned = await bot.helpers.cloneChannel(channel, options.reason);
//Assertations
assertExists(cloned);
assertEquals(cloned.type, channel.type);
// Delay the execution to allow CHANNEL_CREATE event to be processed
await delayUntil(10000, () => bot.channels.has(cloned.id));
assertExists(bot.channels.has(cloned.id));
assertEquals(channel.topic, cloned.topic);
assertEquals(channel.bitrate, cloned.bitrate);
assertEquals(channel.permissionOverwrites.length, cloned.permissionOverwrites.length);
}
-15
View File
@@ -31,7 +31,6 @@ import { getGuildTests } from "./helpers/guilds/getGuild.ts";
import { getVanityURLTests } from "./helpers/guilds/getVanityUrl.ts";
import { categoryChildrenTest } from "./helpers/channels/categoryChannels.ts";
import { channelOverwriteHasPermissionTest } from "./helpers/channels/channelOverwriteHasPermission.ts";
import { cloneChannelTests } from "./helpers/channels/cloneChannel.ts";
import { deleteChannelOverwriteTests } from "./helpers/channels/deleteChannelOverwrite.ts";
import { editChannelTests } from "./helpers/channels/editChannel.ts";
import { CACHED_COMMUNITY_GUILD_ID, sanitizeMode } from "./constants.ts";
@@ -275,20 +274,6 @@ Deno.test({
},
...sanitizeMode,
});
Deno.test({
name: "[channel] clone a channel w/o a reason",
async fn(t) {
await cloneChannelTests({});
},
...sanitizeMode,
});
Deno.test({
name: "[channel] clone a channel w/ a reason",
async fn(t) {
await cloneChannelTests({ reason: "Blame wolf" });
},
...sanitizeMode,
});
Deno.test({
name: "[channel] delete a channel overwrite",
async fn(t) {