Improve pointer lock handling and update unit tests for third-person navigation

This commit is contained in:
2026-04-27 18:59:13 +02:00
parent 5280e1e5fa
commit daf7d69eee
2 changed files with 13 additions and 3 deletions

View File

@@ -161,7 +161,11 @@ describe("ThirdPersonNavigationController", () => {
});
controller.activate(context);
window.dispatchEvent(new KeyboardEvent("keydown", { code: "Escape" }));
(
controller as unknown as {
handleKeyDown(event: KeyboardEvent): void;
}
).handleKeyDown(new KeyboardEvent("keydown", { code: "Escape" }));
expect(exitPointerLock).toHaveBeenCalledTimes(1);