14 lines
543 B
TypeScript
14 lines
543 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", "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);
|
|
}
|
|
});
|