From 21c4a3bec57fcc6a5e9fb833cc1f12240768d56c Mon Sep 17 00:00:00 2001 From: Alexander Davydov Date: Thu, 19 Mar 2026 20:02:23 +0300 Subject: [PATCH] Tests: fix branch-local type regressions --- extensions/telegram/src/bot-message-dispatch.test.ts | 3 --- .../local/auth-choice.api-key-providers.test.ts | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/extensions/telegram/src/bot-message-dispatch.test.ts b/extensions/telegram/src/bot-message-dispatch.test.ts index caab336558b..14992a5f631 100644 --- a/extensions/telegram/src/bot-message-dispatch.test.ts +++ b/extensions/telegram/src/bot-message-dispatch.test.ts @@ -224,9 +224,6 @@ describe("dispatchTelegramMessage draft streaming", () => { replyToMode: "first", streamMode: params.streamMode ?? "partial", textLimit: 4096, - telegramDeps: { - dispatchReplyWithBufferedBlockDispatcher, - } as unknown as NonNullable[0]["telegramDeps"]>, telegramCfg: params.telegramCfg ?? {}, telegramDeps: params.telegramDeps ?? telegramDepsForTest, opts: { token: "token" }, diff --git a/src/commands/onboard-non-interactive/local/auth-choice.api-key-providers.test.ts b/src/commands/onboard-non-interactive/local/auth-choice.api-key-providers.test.ts index 0944054cc20..82d64eb5b27 100644 --- a/src/commands/onboard-non-interactive/local/auth-choice.api-key-providers.test.ts +++ b/src/commands/onboard-non-interactive/local/auth-choice.api-key-providers.test.ts @@ -1,5 +1,6 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../../../config/config.js"; +import type { RuntimeEnv } from "../../../runtime.js"; import { applySimpleNonInteractiveApiKeyChoice } from "./auth-choice.api-key-providers.js"; const applyAuthProfileConfig = vi.hoisted(() => vi.fn((cfg: OpenClawConfig) => cfg)); @@ -120,11 +121,11 @@ describe("applySimpleNonInteractiveApiKeyChoice", () => { it("rejects Basic-shaped GIGACHAT_CREDENTIALS in the OAuth onboarding path", async () => { const nextConfig = { agents: { defaults: {} } } as OpenClawConfig; - const runtime = { + const runtime: RuntimeEnv = { error: vi.fn(), exit: vi.fn(), log: vi.fn(), - } as never; + }; const resolveApiKey = vi.fn(async () => ({ key: "basic-user:basic-pass", source: "env" as const,