From 00e32cf04a464167bdbcdbd6e367ed8ea4629ab1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 18 Feb 2026 17:16:36 +0000 Subject: [PATCH] test(auto-reply): type set/unset action helper expectations --- src/auto-reply/reply/commands-setunset.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/auto-reply/reply/commands-setunset.test.ts b/src/auto-reply/reply/commands-setunset.test.ts index c40490e491..5cac023175 100644 --- a/src/auto-reply/reply/commands-setunset.test.ts +++ b/src/auto-reply/reply/commands-setunset.test.ts @@ -1,6 +1,11 @@ import { describe, expect, it } from "vitest"; import { parseSetUnsetCommand, parseSetUnsetCommandAction } from "./commands-setunset.js"; +type ParsedSetUnsetAction = + | { action: "set"; path: string; value: unknown } + | { action: "unset"; path: string } + | { action: "error"; message: string }; + describe("parseSetUnsetCommand", () => { it("parses unset values", () => { expect( @@ -25,7 +30,7 @@ describe("parseSetUnsetCommand", () => { describe("parseSetUnsetCommandAction", () => { it("returns null for non set/unset actions", () => { - const result = parseSetUnsetCommandAction({ + const result = parseSetUnsetCommandAction({ slash: "/config", action: "show", args: "", @@ -37,7 +42,7 @@ describe("parseSetUnsetCommandAction", () => { }); it("maps parse errors through onError", () => { - const result = parseSetUnsetCommandAction({ + const result = parseSetUnsetCommandAction({ slash: "/config", action: "set", args: "",