Refactor and correct type assertions in scene-document-validation.test.ts
This commit is contained in:
@@ -159,16 +159,16 @@ describe("validateSceneDocument", () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
(
|
const soundVolumeAction = document.interactionLinks["link-sound-volume"]
|
||||||
document.interactionLinks["link-sound-volume"].action.effect as {
|
.action as typeof document.interactionLinks["link-sound-volume"]["action"] & {
|
||||||
volume: number;
|
effect: { volume: number };
|
||||||
}
|
};
|
||||||
).volume = Number.NaN;
|
const ambientColorAction = document.interactionLinks["link-ambient-color"]
|
||||||
(
|
.action as typeof document.interactionLinks["link-ambient-color"]["action"] & {
|
||||||
document.interactionLinks["link-ambient-color"].action.effect as {
|
effect: { colorHex: string };
|
||||||
colorHex: string;
|
};
|
||||||
}
|
soundVolumeAction.effect.volume = Number.NaN;
|
||||||
).colorHex = "not-a-color";
|
ambientColorAction.effect.colorHex = "not-a-color";
|
||||||
|
|
||||||
const validation = validateSceneDocument(document);
|
const validation = validateSceneDocument(document);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user