Skip to content

Commit 8cb093e

Browse files
committed
docs: document cli test batch
1 parent 3e29885 commit 8cb093e

40 files changed

Lines changed: 41 additions & 4 deletions

src/cli/capability-cli.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Capability CLI tests cover capability command registration and output formatting.
12
import fs from "node:fs/promises";
23
import os from "node:os";
34
import path from "node:path";

src/cli/channel-auth.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Channel auth CLI tests cover channel auth command routing and credential prompts.
12
import { beforeEach, describe, expect, it, vi } from "vitest";
23
import { runChannelLogin, runChannelLogout } from "./channel-auth.js";
34

src/cli/cli-utils.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// CLI utility tests cover shared command helpers, option parsing, and output formatting.
12
import { Command } from "commander";
23
import { describe, expect, it, vi } from "vitest";
34
import { registerDnsCli } from "./dns-cli.js";

src/cli/command-path-matches.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Command path match tests cover CLI command path matching and normalization.
12
import { describe, expect, it } from "vitest";
23
import {
34
matchesAnyCommandPath,

src/cli/command-path-policy.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Command path policy tests cover allowed CLI command path shapes and lazy imports.
12
import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures";
23
import { afterEach, describe, expect, it, vi } from "vitest";
34
import type { CliCommandCatalogEntry, CliCommandPathPolicy } from "./command-catalog.js";

src/cli/command-registration-policy.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Command registration policy tests cover CLI registration boundaries and duplicate guards.
12
import { describe, expect, it } from "vitest";
23
import {
34
shouldEagerRegisterSubcommands,

src/cli/command-secret-gateway.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Command secret gateway tests cover secret resolution for gateway-backed CLI commands.
12
import { beforeEach, describe, expect, it, vi } from "vitest";
23
import type { OpenClawConfig } from "../config/config.js";
34
import { withEnvAsync } from "../test-utils/env.js";

src/cli/completion-runtime.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Completion runtime tests cover shell completion generation and runtime file writes.
12
import fs from "node:fs/promises";
23
import os from "node:os";
34
import path from "node:path";

src/cli/config-cli.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Config CLI tests cover config command registration, reads, writes, and output modes.
12
import fs from "node:fs";
23
import os from "node:os";
34
import path from "node:path";
@@ -2265,10 +2266,7 @@ describe("config cli", () => {
22652266
const rootDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-config-plugin-provider-"));
22662267
try {
22672268
writeSecurePluginEntrypoint(path.join(rootDir, "index.js"), "export default {};\n");
2268-
writeSecurePluginEntrypoint(
2269-
path.join(rootDir, "resolve.mjs"),
2270-
"process.stdin.resume();\n",
2271-
);
2269+
writeSecurePluginEntrypoint(path.join(rootDir, "resolve.mjs"), "process.stdin.resume();\n");
22722270
const resolved = {
22732271
secrets: {
22742272
providers: {},

src/cli/devices-cli.lazy.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Devices CLI lazy tests cover lazy device command imports and registration.
12
import { Command } from "commander";
23
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
34

0 commit comments

Comments
 (0)