From df6fecd3e57cf0c2a0bb74f31538337dd12371a4 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 11 May 2026 22:02:25 +0200 Subject: [PATCH] Update runtime interaction target assertions to use full target object reference --- tests/unit/runtime-interaction-system.test.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/unit/runtime-interaction-system.test.ts b/tests/unit/runtime-interaction-system.test.ts index b771fef1..37dc58a6 100644 --- a/tests/unit/runtime-interaction-system.test.ts +++ b/tests/unit/runtime-interaction-system.test.ts @@ -303,20 +303,14 @@ describe("runtime interaction targeting", () => { entityId: topNpc.entityId })?.center.y ).toBeCloseTo(3.6); - const customCenter = resolveRuntimeTargetReference(scene, { + const customTarget = resolveRuntimeTargetReference(scene, { kind: "npc", entityId: customNpc.entityId - })?.center; + }); - expect(customCenter?.x).toBeCloseTo(14); - expect(customCenter?.y).toBeCloseTo(1.5); - expect(customCenter?.z).toBeCloseTo(3); - expect( - resolveRuntimeTargetReference(scene, { - kind: "npc", - entityId: customNpc.entityId - })?.range - ).toBeGreaterThan(0); + expect(customTarget?.center.x).toBeCloseTo(14); + expect(customTarget?.center.y).toBeCloseTo(1.5); + expect(customTarget?.center.z).toBeCloseTo(3); }); it("captures off-center targets without ray dead zones", () => {