Files
discordeno/tests/misc/gatewaybot.test.ts
Jonathan Ho 1c7859fea9 Test: clean up CI and test (#2555)
* 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
2022-10-26 10:41:26 -05:00

18 lines
533 B
TypeScript

import { assertEquals, assertExists } from "../deps.ts";
import { loadBot } from "../mod.ts";
Deno.test({
name: "[misc] Get gateway bot information",
ignore: Deno.env.get("TEST_ENV") === "UNIT",
async fn(t) {
const bot = loadBot();
const data = await bot.helpers.getGatewayBot();
assertExists(data);
assertEquals(data.url, "wss://gateway.discord.gg");
assertEquals(data.shards, 1);
assertEquals(data.sessionStartLimit.total, 1000);
assertEquals(data.sessionStartLimit.maxConcurrency, 1);
},
});