mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 08:20:08 +00:00
add tests
This commit is contained in:
16
tests/discoveries/get_discovery_categories.ts
Normal file
16
tests/discoveries/get_discovery_categories.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defaultTestOptions } from "../ws/start_bot.ts";
|
||||
import { assertEquals } from "../deps.ts";
|
||||
import { getDiscoveryCategories } from "../../src/helpers/discovery/get_discovery_categories.ts";
|
||||
|
||||
Deno.test({
|
||||
name: "[discovery] get categories",
|
||||
async fn() {
|
||||
const categories = await getDiscoveryCategories();
|
||||
|
||||
assertEquals(
|
||||
categories.size > 0,
|
||||
true,
|
||||
);
|
||||
},
|
||||
...defaultTestOptions,
|
||||
});
|
||||
16
tests/discoveries/valid_discovery_term.ts
Normal file
16
tests/discoveries/valid_discovery_term.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defaultTestOptions } from "../ws/start_bot.ts";
|
||||
import { assertEquals } from "../deps.ts";
|
||||
import { validDiscoveryTerm } from "../../src/helpers/discovery/valid_discovery_term.ts";
|
||||
|
||||
Deno.test({
|
||||
name: "[discovery] get categories",
|
||||
async fn() {
|
||||
const valid = await validDiscoveryTerm("Bots");
|
||||
|
||||
assertEquals(
|
||||
valid,
|
||||
true,
|
||||
);
|
||||
},
|
||||
...defaultTestOptions,
|
||||
});
|
||||
@@ -69,6 +69,9 @@ import "./roles/remove_role.ts";
|
||||
// Members tests
|
||||
import "./members/search_members.ts";
|
||||
|
||||
// Discoveries tests
|
||||
import "./discoveries/get_discovery_categories.ts";
|
||||
|
||||
// Final cleanup
|
||||
import "./guilds/delete_server.ts";
|
||||
import "./ws/ws_close.ts";
|
||||
|
||||
Reference in New Issue
Block a user