feat(characters): use local character catalog
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { ROUTES } from "@/router/routes";
|
||||
import { getCharacterRoutes, ROUTES } from "@/router/routes";
|
||||
|
||||
import {
|
||||
resolveExternalEntryDestination,
|
||||
@@ -33,7 +33,21 @@ describe("external entry navigation", () => {
|
||||
});
|
||||
|
||||
it("routes every tip entry to the tier selection page", () => {
|
||||
expect(resolveExternalEntryDestination({ target: "tip" })).toBe("/tip");
|
||||
expect(resolveExternalEntryDestination({ target: "tip" })).toBe(
|
||||
getCharacterRoutes("elio").tip,
|
||||
);
|
||||
});
|
||||
|
||||
it("uses a known character slug and falls back to Elio", () => {
|
||||
expect(
|
||||
resolveExternalEntryDestination({ target: "chat", character: "maya" }),
|
||||
).toBe(getCharacterRoutes("maya").chat);
|
||||
expect(
|
||||
resolveExternalEntryDestination({
|
||||
target: "private-room",
|
||||
character: "unknown",
|
||||
}),
|
||||
).toBe(getCharacterRoutes("elio").privateRoom);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user