feat(housekeeping): cut over administration to ase
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { CanonicalHousekeepingHref } from "../contracts";
|
||||
import { toHousekeepingHref } from "./href";
|
||||
import { HOUSEKEEPING_ROOT, toHousekeepingHref } from "./href";
|
||||
|
||||
describe("toHousekeepingHref", () => {
|
||||
it("keeps the canonical operations root unchanged", () => {
|
||||
expect(toHousekeepingHref("/ase", "canonical")).toBe("/ase");
|
||||
expect(HOUSEKEEPING_ROOT).toBe("/ase");
|
||||
expect(toHousekeepingHref("/ase")).toBe("/ase");
|
||||
});
|
||||
|
||||
it("maps a canonical domain route to the preview namespace", () => {
|
||||
expect(toHousekeepingHref("/ase/people/users", "preview")).toBe(
|
||||
"/ase-next/people/users",
|
||||
);
|
||||
it("keeps canonical domain routes unchanged", () => {
|
||||
expect(toHousekeepingHref("/ase/people/users")).toBe("/ase/people/users");
|
||||
});
|
||||
|
||||
it("rejects paths outside the canonical ase namespace", () => {
|
||||
expect(() =>
|
||||
toHousekeepingHref("/admin" as CanonicalHousekeepingHref, "canonical"),
|
||||
toHousekeepingHref("/admin" as CanonicalHousekeepingHref),
|
||||
).toThrow("invalid canonical housekeeping href");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user