docs: document remaining cli tests

This commit is contained in:
Peter Steinberger
2026-06-04 19:37:38 -04:00
parent 4995907541
commit 408ba4c8a0
39 changed files with 39 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
// ACP CLI option collision tests cover ACP command flag registration boundaries.
import { Command } from "commander";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { runRegisteredCli } from "../test-utils/command-runner.js";

View File

@@ -1,3 +1,4 @@
// Channel option tests cover channel command option parsing and config resolution.
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { testing, formatCliChannelOptions, resolveCliChannelOptions } from "./channel-options.js";
import { testing as startupMetadataTesting } from "./startup-metadata.js";

View File

@@ -1,3 +1,4 @@
// Command config resolution tests cover config lookup before command execution.
import { beforeEach, describe, expect, it, vi } from "vitest";
const mocks = vi.hoisted(() => ({

View File

@@ -1,3 +1,4 @@
// Command option tests cover shared CLI option registration and parsing.
import { Command } from "commander";
import { describe, expect, it } from "vitest";
import { inheritOptionFromParent } from "./command-options.js";

View File

@@ -1,3 +1,4 @@
// Fish completion tests cover fish shell completion script generation.
import { describe, expect, it } from "vitest";
import {
buildFishOptionCompletionLine,

View File

@@ -1,3 +1,4 @@
// Config CLI integration tests cover end-to-end config command reads and writes.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Config set input tests cover config value parsing from CLI input and files.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Config set mode tests cover config set input modes and value parsing.
import { describe, expect, it } from "vitest";
import { resolveConfigSetMode } from "./config-set-parser.js";

View File

@@ -1,3 +1,4 @@
// Container target tests cover CLI container target parsing and validation.
import { describe, expect, it, vi } from "vitest";
import {
maybeRunCliInContainer,

View File

@@ -1,3 +1,4 @@
// Cron CLI tests cover cron command registration and schedule output.
import { Command } from "commander";
import { afterEach, describe, expect, it, vi } from "vitest";
import type { CronJob } from "../cron/types.js";

View File

@@ -1,3 +1,4 @@
// Daemon CLI compatibility tests cover legacy daemon command aliases and output.
import { describe, expect, it } from "vitest";
import {
resolveLegacyDaemonCliAccessors,

View File

@@ -1,3 +1,4 @@
// Dependency tests cover CLI dependency imports and cold-start safety.
import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures";
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { ChannelPlugin } from "../channels/plugins/types.js";

View File

@@ -1,3 +1,4 @@
// Devices CLI tests cover device command registration and output behavior.
import { Command } from "commander";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { stripAnsi } from "../../packages/terminal-core/src/ansi.js";

View File

@@ -1,3 +1,4 @@
// Exec policy CLI tests cover execution policy command behavior and persistence.
import crypto from "node:crypto";
import { Command } from "commander";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Failure output tests cover CLI error formatting and failure summaries.
import { describe, expect, it } from "vitest";
import { formatCliFailureLines } from "./failure-output.js";

View File

@@ -1,3 +1,4 @@
// Help cold import tests cover root help output without loading heavy command modules.
import { Command } from "commander";
import { beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Log level option tests cover CLI log-level flag parsing and validation.
import { describe, expect, it } from "vitest";
import { parseCliLogLevelOption } from "./log-level-option.js";

View File

@@ -1,3 +1,4 @@
// Model auth runtime boundary tests cover CLI/model auth import boundaries.
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";

View File

@@ -1,3 +1,4 @@
// Nodes camera tests cover camera node command media handling and file inputs.
import * as fs from "node:fs/promises";
import * as path from "node:path";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Nodes CLI coverage tests cover node command branches and output formatting.
import { Command } from "commander";
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { registerNodesCli } from "./nodes-cli.js";

View File

@@ -1,3 +1,4 @@
// Pairing CLI tests cover pairing command registration and pairing status output.
import { Command } from "commander";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { theme } from "../../packages/terminal-core/src/theme.js";

View File

@@ -1,3 +1,4 @@
// Plugin install plan tests cover install planning for local, registry, and bundled plugins.
import { installedPluginRoot } from "openclaw/plugin-sdk/test-fixtures";
import { describe, expect, it, vi } from "vitest";
import { PLUGIN_INSTALL_ERROR_CODE } from "../plugins/install.js";

View File

@@ -1,3 +1,4 @@
// Plugins authoring command tests cover plugin authoring command output and file generation.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Plugins CLI install tests cover plugin install command selection and output.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Plugins CLI lazy tests cover lazy plugin command registration and imports.
import { Command } from "commander";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Plugins CLI policy tests cover plugin command policy checks and warnings.
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../config/config.js";
import {

View File

@@ -1,3 +1,4 @@
// Plugin config tests cover plugin config command parsing and output formatting.
import { describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../config/config.js";
import { setPluginEnabledInConfig } from "./plugins-config.js";

View File

@@ -1,3 +1,4 @@
// Plugin install config tests cover install specs and generated plugin config.
import { bundledPluginRootAt, repoInstallSpec } from "openclaw/plugin-sdk/test-fixtures";
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../config/config.js";

View File

@@ -1,3 +1,4 @@
// Plugin install persist tests cover saving installed plugin records after install.
import { beforeEach, describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../config/config.js";
import {

View File

@@ -1,3 +1,4 @@
// Plugins list command tests cover plugin list command execution and output.
import { afterEach, describe, expect, it, vi } from "vitest";
import type { OutputRuntimeEnv } from "../runtime.js";

View File

@@ -1,3 +1,4 @@
// Plugins search command tests cover plugin search command registration and results.
import { Command } from "commander";
import { beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Port tests cover CLI port probing and conflict handling.
import { EventEmitter } from "node:events";
import net from "node:net";
import { afterEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Program nodes test-helper tests cover node command fixture helpers.
import { describe, expect, it } from "vitest";
import { IOS_NODE, createIosNodeListResponse } from "./program.nodes-test-helpers.js";

View File

@@ -1,3 +1,4 @@
// Run main exit tests cover process exit behavior for CLI failures.
import process from "node:process";
import { CommanderError } from "commander";
import { beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Secrets CLI tests cover secret command registration, reads, writes, and redaction.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Security CLI tests cover security command registration and diagnostics output.
import { Command } from "commander";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { registerSecurityCli } from "./security-cli.js";

View File

@@ -1,3 +1,4 @@
// Skills CLI tests cover skill listing, install, and command output behavior.
import { describe, expect, it, vi } from "vitest";
import type { SkillStatusEntry, SkillStatusReport } from "../skills/discovery/status.js";
import { createEmptyInstallChecks } from "./requirements-test-fixtures.js";

View File

@@ -1,3 +1,4 @@
// Skills CLI verify tests cover skill verification command behavior and diagnostics.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Windows argv tests cover Windows-specific command-line argument normalization.
import { describe, expect, it } from "vitest";
import { mockProcessPlatform } from "../test-utils/vitest-spies.js";
import { normalizeWindowsArgv } from "./windows-argv.js";