mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
refactor: base complete for unit tests
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { ws, delay } 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,
|
||||
});
|
||||
Reference in New Issue
Block a user