mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
17 lines
441 B
TypeScript
17 lines
441 B
TypeScript
import { delay, ws } from "../../mod.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);
|
|
shard.ws.close(3064, "Discordeno Testing Finished! Do Not RESUME!");
|
|
});
|
|
|
|
await delay(3000);
|
|
},
|
|
...defaultTestOptions,
|
|
});
|