mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
fmt files damn son
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { defaultTestOptions, tempData } from "../ws/start_bot.ts";
|
||||
import {assertExists} from "../deps.ts";
|
||||
import { assertExists } from "../deps.ts";
|
||||
import { cache } from "../../src/cache.ts";
|
||||
import { delayUntil } from "../util/delay_until.ts";
|
||||
import {createRole} from "../../src/helpers/roles/create_role.ts";
|
||||
import { createRole } from "../../src/helpers/roles/create_role.ts";
|
||||
|
||||
async function ifItFailsBlameWolf(reason?: string) {
|
||||
const role = await createRole(tempData.guildId, {
|
||||
@@ -12,7 +12,10 @@ async function ifItFailsBlameWolf(reason?: string) {
|
||||
assertExists(role);
|
||||
|
||||
// Delay the execution by 5 seconds to allow GUILD_ROLE_CREATE event to be processed
|
||||
await delayUntil(10000, () => cache.guilds.get(tempData.guildId)?.roles.has(role.id));
|
||||
await delayUntil(
|
||||
10000,
|
||||
() => cache.guilds.get(tempData.guildId)?.roles.has(role.id),
|
||||
);
|
||||
|
||||
if (!cache.guilds.get(tempData.guildId)?.roles.has(role.id)) {
|
||||
throw new Error(`The role seemed to be created but it was not cached.`);
|
||||
@@ -22,7 +25,7 @@ async function ifItFailsBlameWolf(reason?: string) {
|
||||
Deno.test({
|
||||
name: "[role] create a role without a reason",
|
||||
async fn() {
|
||||
await ifItFailsBlameWolf()
|
||||
await ifItFailsBlameWolf();
|
||||
},
|
||||
...defaultTestOptions,
|
||||
});
|
||||
@@ -30,7 +33,7 @@ Deno.test({
|
||||
Deno.test({
|
||||
name: "[role] create a role with a reason",
|
||||
async fn() {
|
||||
await ifItFailsBlameWolf( "with a reason")
|
||||
await ifItFailsBlameWolf("with a reason");
|
||||
},
|
||||
...defaultTestOptions,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user