mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-25 19:59:30 +00:00
docs: document command support batch
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Agent command test mocks replace logging and runtime-heavy modules shared by agent command suites.
|
||||
import { vi } from "vitest";
|
||||
|
||||
vi.mock("../logging/subsystem.js", () => {
|
||||
@@ -197,13 +198,7 @@ vi.mock("../agents/model-selection.js", () => {
|
||||
resolveDefaultRef(cfg),
|
||||
),
|
||||
resolveModelRefFromString: vi.fn(
|
||||
({
|
||||
raw,
|
||||
defaultProvider,
|
||||
}: {
|
||||
raw: string;
|
||||
defaultProvider?: string;
|
||||
}) => {
|
||||
({ raw, defaultProvider }: { raw: string; defaultProvider?: string }) => {
|
||||
const ref = parseModelRef(raw, defaultProvider ?? "openai");
|
||||
return ref ? { ref, source: "parsed" } : null;
|
||||
},
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Agent binding test support centralizes mocked channel plugin registries and lazy imports.
|
||||
import type { Mock } from "vitest";
|
||||
import { vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Backup atomicity tests cover temp-file writes, rollback behavior, and backup archive consistency.
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Backup create/verify tests cover archive creation, runtime output, and verification failure handling.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import { backupCreateCommand } from "./backup.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Channels config-only status tests cover fallback output when gateway status is unavailable.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { ChannelPlugin } from "../channels/plugins/types.js";
|
||||
import { makeDirectPlugin } from "../test-utils/channel-plugin-test-fixtures.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Doctor auth alias tests cover canonical API-key profile repair and auth-profile store migration.
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Doctor browser facade tests cover legacy browser residue detection and browser doctor repair wiring.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Doctor config-flow tests cover config repair, migration, stripping, and validation orchestration.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { withTempHome } from "openclaw/plugin-sdk/test-env";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Doctor legacy-config tests cover compatibility normalizers for old channel, browser, and config shapes.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { normalizeLegacyStreamingAliases } from "../config/channel-compat-normalization.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Doctor lint tests cover health-check registry integration and lint warning output.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
import { resetCoreHealthChecksForTest } from "../flows/doctor-core-checks.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Doctor state integrity cloud-storage tests cover macOS cloud-synced state directory detection.
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Doctor update tests cover pre-doctor update prompts, state files, and declined update flows.
|
||||
import fs from "node:fs/promises";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { maybeOfferUpdateBeforeDoctor } from "./doctor-update.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Flows command tests cover task creation, task execution, and runtime command output.
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import { createRunningTaskRun as createRunningTaskRunOrNull } from "../tasks/task-executor.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Non-interactive gateway health auth tests cover SecretRef and password resolution for setup probes.
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Non-interactive onboarding test helpers build runtime stubs that throw instead of exiting.
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
|
||||
type RuntimeLike = Pick<RuntimeEnv, "log" | "error" | "exit">;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Onboard remote tests cover remote gateway prompts, Bonjour discovery, and remote config mutation.
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import type { GatewayBonjourBeacon } from "../infra/bonjour-discovery.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Sandbox command tests cover browser/container status formatting and sandbox diagnostics.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { SandboxBrowserInfo, SandboxContainerInfo } from "../agents/sandbox.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Session command test helpers create temporary homes, session stores, and runtime fixtures.
|
||||
import { randomUUID } from "node:crypto";
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Status overview row tests cover status-all overview values, update metadata, and display rows.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { VERSION } from "../version.js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Status scan execute tests cover overview-driven status probe execution and memory snapshot aggregation.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { executeStatusScanFromOverview } from "./status.scan-execute.ts";
|
||||
import type { StatusScanOverviewResult } from "./status.scan-overview.ts";
|
||||
|
||||
Reference in New Issue
Block a user