mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-31 16:00:07 +00:00
* style: format Deno.test\("(.+)", async \(\) => \{\n([\S\s]*?)^\}\);
* style: format Deno.test\("(.+)", \(\) => \{\n([\S\s]*?)^\}\);
* style: format Deno.test\("(.+)", async \(t\) => \{\n([\S\s]*?)^\}\);
* style: format async function
* chore: turn all to async
* chore: format add t
* style: function format
* chore: add integration and unit test difference
* ci: combine test
* ci: remove if
* ci: add parallel flag
* ci: add UNIT_TEST_GUILD_ID
* ci: static deno version
* ci: add concurrency to Integration test
* ci: bump actions/checkout to v3
18 lines
717 B
TypeScript
18 lines
717 B
TypeScript
import { MfaLevels } from "../../mod.ts";
|
|
import { assertEquals } from "../deps.ts";
|
|
import { loadBot } from "../mod.ts";
|
|
|
|
Deno.test({
|
|
name: "[guild] edit guild mfa level",
|
|
ignore: Deno.env.get("TEST_ENV") === "UNIT",
|
|
async fn(t) {
|
|
const bot = loadBot();
|
|
const guild = await bot.helpers.createGuild({ name: "test" });
|
|
await bot.helpers.editGuildMfaLevel(guild.id, MfaLevels.Elevated, "test");
|
|
assertEquals((await bot.helpers.getGuild(guild.id)).mfaLevel, MfaLevels.Elevated);
|
|
await bot.helpers.editGuildMfaLevel(guild.id, MfaLevels.None, "revert test");
|
|
assertEquals((await bot.helpers.getGuild(guild.id)).mfaLevel, MfaLevels.None);
|
|
await bot.helpers.deleteGuild(guild.id);
|
|
},
|
|
});
|