Add test for round-tripping dialogue library resources through scene schema
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user