change: prettier code

This commit is contained in:
Skillz4Killz
2021-10-30 21:26:36 +00:00
committed by GitHub Action
parent 5051c44e0d
commit 573acf1dc1
2 changed files with 11 additions and 11 deletions
+10 -10
View File
@@ -2,17 +2,17 @@ import { Bot } from "../../../src/bot.ts";
import { assertEquals } from "../../deps.ts"; import { assertEquals } from "../../deps.ts";
export async function pinMessageTests(bot: Bot, channelId: bigint, messageId: bigint, t: Deno.TestContext) { export async function pinMessageTests(bot: Bot, channelId: bigint, messageId: bigint, t: Deno.TestContext) {
let pinned = false; let pinned = false;
bot.events.channelPinsUpdate = function (bot, payload) {
if (payload.channelId === channelId) pinned = !pinned;
}
await bot.helpers.pinMessage(channelId, messageId); bot.events.channelPinsUpdate = function (bot, payload) {
if (payload.channelId === channelId) pinned = !pinned;
};
assertEquals(true, pinned); await bot.helpers.pinMessage(channelId, messageId);
await bot.helpers.unpinMessage(channelId, messageId); assertEquals(true, pinned);
assertEquals(false, pinned); await bot.helpers.unpinMessage(channelId, messageId);
}
assertEquals(false, pinned);
}
+1 -1
View File
@@ -91,7 +91,7 @@ Deno.test("[Bot] - Starting Tests", async (t) => {
// ALL MESSAGE RELATED TESTS THAT DEPEND ON AN EXISTING CHANNEL // ALL MESSAGE RELATED TESTS THAT DEPEND ON AN EXISTING CHANNEL
await t.step("Message related tests", async (t) => { await t.step("Message related tests", async (t) => {
const message = await bot.helpers.sendMessage(channel.id, "Hello Skillz"); const message = await bot.helpers.sendMessage(channel.id, "Hello Skillz");
// CONDUCT ALL TESTS RELATED TO A MESSAGE HERE // CONDUCT ALL TESTS RELATED TO A MESSAGE HERE
await Promise.all([ await Promise.all([
t.step({ t.step({