refactor(commands): centralize command ids

This commit is contained in:
syntaxbullet
2026-07-03 11:31:02 +02:00
parent 8320203f11
commit 84a610f019
15 changed files with 66 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
import { describe, expect, test } from "bun:test";
import { commandIds } from "@commands/ids";
import { createViewportPanInputController } from "./viewport-pan";
const ignoredState = undefined as never;
@@ -20,8 +21,8 @@ describe("viewport pan input controller", () => {
expect(controller.keyDown(keyEvent("Space"))).toBe(true);
expect(controller.keyUp(keyEvent("Space"))).toBe(true);
expect(dispatched).toEqual([
{ commandId: "tool.enterTemporaryPan", payload: undefined },
{ commandId: "tool.exitTemporaryPan", payload: undefined },
{ commandId: commandIds.toolEnterTemporaryPan, payload: undefined },
{ commandId: commandIds.toolExitTemporaryPan, payload: undefined },
]);
});