Improve pointer lock handling and update unit tests for third-person navigation
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user