From 62e4679a9db9b0ac488651b124c566e7b39c45b0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 30 Oct 2026 12:22:11 +0000 Subject: [PATCH] chore(core): cover joystick drag tracking Adds a unit test that moves the pointer across the joystick surface before release. Line coverage for joystick.ts rises from 233/238 (97.89%) to 238/238 (100%), and branch coverage rises from 231/259 (89.18%) to 235/259 (90.73%). No behavior change. Co-authored-by: Cory Rylan Signed-off-by: Cursor Agent --- projects/core/src/joystick/joystick.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/core/src/joystick/joystick.test.ts b/projects/core/src/joystick/joystick.test.ts index 1cabfc92d..45b5ee109 100644 --- a/projects/core/src/joystick/joystick.test.ts +++ b/projects/core/src/joystick/joystick.test.ts @@ -408,6 +408,14 @@ describe(Joystick.metadata.tag, () => { expect(element.matches(':state(active)')).toBe(true); }); + it('should track the pointer across the surface before release', () => { + element.dispatchEvent(pointer('pointerdown', 60, 60)); + expect(element.value).toEqual({ x: 0, y: 0 }); + element.dispatchEvent(pointer('pointermove', 85, 35)); + expect(element.value).toEqual({ x: 0.5, y: -0.5 }); + expect(element.matches(':state(active)')).toBe(true); + }); + it.each(['square', 'horizontal', 'vertical'] as const)('should constrain pointer input to %s', async constraint => { element.constraint = constraint; await elementIsStable(element);