From 37c3dade46c4b4f581ddaea9dfea4e2f2ae4bb82 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 20:02:07 +0200 Subject: [PATCH] Add test for round-tripping dialogue library resources through scene schema --- .../serialization/scene-document-json.test.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/serialization/scene-document-json.test.ts b/tests/serialization/scene-document-json.test.ts index 8e2022ba..b31831f3 100644 --- a/tests/serialization/scene-document-json.test.ts +++ b/tests/serialization/scene-document-json.test.ts @@ -73,6 +73,25 @@ describe("scene document JSON", () => { 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", () => { const npc = createNpcEntity({ id: "entity-npc-clocksmith",