Add test for round-tripping dialogue library resources through scene schema

This commit is contained in:
2026-04-14 20:02:07 +02:00
parent f8b604fcb4
commit 37c3dade46

View File

@@ -73,6 +73,25 @@ describe("scene document JSON", () => {
expect(parseSceneDocumentJson(serializedDocument)).toEqual(document); expect(parseSceneDocumentJson(serializedDocument)).toEqual(document);
}); });
it("round-trips project dialogue library resources through the scene schema", () => {
const document = createEmptySceneDocument({ name: "Dialogue Scene" });
document.dialogues.dialogues["dialogue-bell"] = {
id: "dialogue-bell",
title: "Bell Tower",
lines: [
{
id: "dialogue-line-bell-1",
speakerName: "Watcher",
text: "The bell rings before dawn."
}
]
};
expect(parseSceneDocumentJson(serializeSceneDocument(document))).toEqual(
document
);
});
it("round-trips authored scheduler routines in the scene document schema", () => { it("round-trips authored scheduler routines in the scene document schema", () => {
const npc = createNpcEntity({ const npc = createNpcEntity({
id: "entity-npc-clocksmith", id: "entity-npc-clocksmith",