From d8837bb72fb0850dcd002d192e4bb47219dc8b3d Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 02:43:54 +0200 Subject: [PATCH] Refactor and correct type assertions in scene-document-validation.test.ts --- .../domain/scene-document-validation.test.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/domain/scene-document-validation.test.ts b/tests/domain/scene-document-validation.test.ts index d5b4a74b..21e06c19 100644 --- a/tests/domain/scene-document-validation.test.ts +++ b/tests/domain/scene-document-validation.test.ts @@ -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);