feat(commands): type command payload dispatch
This commit is contained in:
@@ -7,7 +7,7 @@ import { viewportPanCommand } from "./viewport";
|
||||
describe("command dispatcher", () => {
|
||||
test("throws for unknown commands", () => {
|
||||
const store = createAppStore(createInitialAppState("Test"), createCommandRegistry([]));
|
||||
expect(() => store.dispatch("missing", undefined)).toThrow("Unknown command: missing");
|
||||
expect(() => store.dispatch("missing" as never, undefined as never)).toThrow("Unknown command: missing");
|
||||
});
|
||||
|
||||
test("dispatch applies command result to store", () => {
|
||||
|
||||
Reference in New Issue
Block a user