mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 08:20:08 +00:00
18 lines
495 B
TypeScript
18 lines
495 B
TypeScript
import { delay } from "../../src/util/utils.ts";
|
|
import { ws } from "../../src/ws/ws.ts";
|
|
import { defaultTestOptions } from "./start_bot.ts";
|
|
|
|
// Exit the Deno process once all tests are done.
|
|
Deno.test({
|
|
name: "[ws] Close all shards manually.",
|
|
async fn() {
|
|
ws.shards.forEach((shard) => {
|
|
clearInterval(shard.heartbeat.intervalId);
|
|
ws.closeWS(shard.ws, 3061, "Discordeno Testing Finished! Do Not RESUME!");
|
|
});
|
|
|
|
await delay(3000);
|
|
},
|
|
...defaultTestOptions,
|
|
});
|