Refactor and correct type assertions in scene-document-validation.test.ts

This commit is contained in:
2026-04-14 02:43:54 +02:00
parent 36b6e19c4d
commit d8837bb72f

View File

@@ -159,16 +159,16 @@ describe("validateSceneDocument", () => {
})
}
};
(
document.interactionLinks["link-sound-volume"].action.effect as {
volume: number;
}
).volume = Number.NaN;
(
document.interactionLinks["link-ambient-color"].action.effect as {
colorHex: string;
}
).colorHex = "not-a-color";
const soundVolumeAction = document.interactionLinks["link-sound-volume"]
.action as typeof document.interactionLinks["link-sound-volume"]["action"] & {
effect: { volume: number };
};
const ambientColorAction = document.interactionLinks["link-ambient-color"]
.action as typeof document.interactionLinks["link-ambient-color"]["action"] & {
effect: { colorHex: string };
};
soundVolumeAction.effect.volume = Number.NaN;
ambientColorAction.effect.colorHex = "not-a-color";
const validation = validateSceneDocument(document);