From 15396640268076766d4e81952c1c59ae8127203e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 20 Jan 2026 15:16:32 +0200 Subject: [PATCH] Revert "test(client): fix broken tests after change in shortcut behaviour" This reverts commit e33950e0009dd20c27851c6ca21961c8f9d924da. --- apps/client/src/services/shortcuts.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/client/src/services/shortcuts.spec.ts b/apps/client/src/services/shortcuts.spec.ts index ed17dcd391..f2170da30d 100644 --- a/apps/client/src/services/shortcuts.spec.ts +++ b/apps/client/src/services/shortcuts.spec.ts @@ -1,6 +1,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import shortcuts, { isIMEComposing,keyMatches, matchesShortcut } from "./shortcuts.js"; +import shortcuts, { isIMEComposing, keyMatches, matchesShortcut } from "./shortcuts.js"; // Mock utils module vi.mock("./utils.js", () => ({ @@ -249,7 +249,7 @@ describe("shortcuts", () => { const handler = vi.fn(); shortcuts.bindGlobalShortcut("ctrl+a", handler, "test-namespace"); - expect(mockElement.addEventListener).toHaveBeenCalledWith("keydown", expect.any(Function), true); + expect(mockElement.addEventListener).toHaveBeenCalledWith("keydown", expect.any(Function)); }); it("should not bind shortcuts when handler is null", () => { @@ -280,7 +280,7 @@ describe("shortcuts", () => { const handler = vi.fn(); shortcuts.bindElShortcut(mockJQueryEl, "ctrl+a", handler, "test-namespace"); - expect(mockEl.addEventListener).toHaveBeenCalledWith("keydown", expect.any(Function), true); + expect(mockEl.addEventListener).toHaveBeenCalledWith("keydown", expect.any(Function)); }); it("should fall back to document when element is empty", () => { @@ -290,7 +290,7 @@ describe("shortcuts", () => { const handler = vi.fn(); shortcuts.bindElShortcut(emptyJQuery, "ctrl+a", handler, "test-namespace"); - expect(mockElement.addEventListener).toHaveBeenCalledWith("keydown", expect.any(Function), true); + expect(mockElement.addEventListener).toHaveBeenCalledWith("keydown", expect.any(Function)); }); }); @@ -301,7 +301,7 @@ describe("shortcuts", () => { shortcuts.removeGlobalShortcut("test-namespace"); - expect(mockElement.removeEventListener).toHaveBeenCalledWith("keydown", expect.any(Function), true); + expect(mockElement.removeEventListener).toHaveBeenCalledWith("keydown", expect.any(Function)); }); });