feat(guides): autosave structured guide data
CI / Verify (push) Successful in 57s
CI / Build immutable images and deploy (push) Successful in 3m10s

This commit is contained in:
2026-08-29 18:13:02 +00:00 Unverified
parent c4fcf3f996
commit ac9a733370
14 changed files with 3794 additions and 68 deletions
+23
View File
@@ -0,0 +1,23 @@
import { describe, expect, it } from "vitest";
import { cleanLunarisText, constellationSnapshot } from "@/lib/catalog/lunaris";
describe("Lunaris character data", () => {
it("removes display markup from constellation text", () => {
expect(cleanLunarisText('"A {LINK#N1}<color=#fff>bright</color>{/LINK} morning"')).toBe("A bright morning");
});
it("normalizes constellation levels and icon keys", () => {
const result = constellationSnapshot({
constellations: {
const1: { name: '"First"', description: "Detail", icon: "UI_Talent_Test_01" },
},
}, (icon) => `catalog/1/constellations/${icon}.webp`);
expect(result).toEqual([{
level: 1,
name: "First",
description: "Detail",
iconKey: "catalog/1/constellations/UI_Talent_Test_01.webp",
}]);
});
});