24 lines
613 B
TypeScript
24 lines
613 B
TypeScript
import "../setup.ts";
|
|
import { assert, assertFalse } from "@std/assert";
|
|
import { isReservedSlug } from "../../lib/reserved-slugs.ts";
|
|
|
|
Deno.test("category slugs: the feed tabs, app pages and server paths are reserved", () => {
|
|
for (
|
|
const word of [
|
|
"hot",
|
|
"follow",
|
|
"settings",
|
|
"manage",
|
|
"community",
|
|
"api",
|
|
"ws",
|
|
]
|
|
) {
|
|
assert(isReservedSlug(word), word);
|
|
}
|
|
// v3's words are free again: nothing lives at /dumps or /users now.
|
|
for (const word of ["music", "dumps", "users", "playlists", "~"]) {
|
|
assertFalse(isReservedSlug(word), word);
|
|
}
|
|
});
|