From 21087c5c702aff259e928893a5b433e3eac80083 Mon Sep 17 00:00:00 2001 From: Brian Mendonca Date: Sat, 21 Feb 2026 15:56:38 -0700 Subject: [PATCH] test: fix rebase-introduced tsgo regressions --- ...egacy-config-detection.rejects-routing-allowfrom.e2e.test.ts | 1 - src/infra/exec-approvals.test.ts | 1 - src/infra/heartbeat-runner.returns-default-unset.test.ts | 2 -- src/telegram/send.test.ts | 2 +- 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/config/config.legacy-config-detection.rejects-routing-allowfrom.e2e.test.ts b/src/config/config.legacy-config-detection.rejects-routing-allowfrom.e2e.test.ts index 278d3fc9922..5682fce27ca 100644 --- a/src/config/config.legacy-config-detection.rejects-routing-allowfrom.e2e.test.ts +++ b/src/config/config.legacy-config-detection.rejects-routing-allowfrom.e2e.test.ts @@ -1,7 +1,6 @@ import { describe, expect, it } from "vitest"; import type { OpenClawConfig } from "./config.js"; import { migrateLegacyConfig, validateConfigObject } from "./config.js"; -import type { OpenClawConfig } from "./config.js"; function getLegacyRouting(config: unknown) { return (config as { routing?: Record } | undefined)?.routing; diff --git a/src/infra/exec-approvals.test.ts b/src/infra/exec-approvals.test.ts index 7ab0b235092..2d34ba468e1 100644 --- a/src/infra/exec-approvals.test.ts +++ b/src/infra/exec-approvals.test.ts @@ -25,7 +25,6 @@ import { resolveSafeBins, type ExecApprovalsAgent, type ExecAllowlistEntry, - type ExecApprovalsAgent, type ExecApprovalsFile, } from "./exec-approvals.js"; import { SAFE_BIN_PROFILE_FIXTURES, SAFE_BIN_PROFILES } from "./exec-safe-bin-policy.js"; diff --git a/src/infra/heartbeat-runner.returns-default-unset.test.ts b/src/infra/heartbeat-runner.returns-default-unset.test.ts index cc4a29d1b5e..9dd7a025b8d 100644 --- a/src/infra/heartbeat-runner.returns-default-unset.test.ts +++ b/src/infra/heartbeat-runner.returns-default-unset.test.ts @@ -4,7 +4,6 @@ import path from "node:path"; import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { HEARTBEAT_PROMPT } from "../auto-reply/heartbeat.js"; import * as replyModule from "../auto-reply/reply.js"; -import type { ReplyPayload } from "../auto-reply/types.js"; import { whatsappOutbound } from "../channels/plugins/outbound/whatsapp.js"; import type { OpenClawConfig } from "../config/config.js"; import { @@ -21,7 +20,6 @@ import { type HeartbeatDeps, resolveHeartbeatIntervalMs, resolveHeartbeatPrompt, - type HeartbeatDeps, runHeartbeatOnce, } from "./heartbeat-runner.js"; import { diff --git a/src/telegram/send.test.ts b/src/telegram/send.test.ts index a6a3a064594..3d2da3a9aa9 100644 --- a/src/telegram/send.test.ts +++ b/src/telegram/send.test.ts @@ -604,7 +604,7 @@ describe("sendMessageTelegram", () => { ...("replyToMessageId" in testCase.options ? { replyToMessageId: testCase.options.replyToMessageId } : {}), - ...("buttons" in testCase.options + ...(Array.isArray(testCase.options.buttons) ? { buttons: testCase.options.buttons.map((row) => row.map((button) => ({ ...button }))), }