docs: document channel plugin tests

This commit is contained in:
Peter Steinberger
2026-06-04 19:24:55 -04:00
parent c135624c69
commit fa46138047
49 changed files with 49 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
// Account action gate tests cover channel account action visibility and enablement checks.
import { describe, expect, it } from "vitest";
import { createAccountActionGate } from "./account-action-gate.js";

View File

@@ -1,3 +1,4 @@
// Account helper tests cover channel account normalization and lookup helpers.
import { describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../../config/config.js";
import { normalizeAccountId } from "../../routing/session-key.js";

View File

@@ -1,3 +1,4 @@
// ACP binding tests cover channel plugin ACP target binding and stateful driver behavior.
import { beforeEach, describe, expect, it, vi } from "vitest";
import { buildConfiguredAcpSessionKey } from "../../acp/persistent-bindings.types.js";
import { ensureConfiguredBindingBuiltinsRegistered } from "./configured-binding-builtins.js";

View File

@@ -1,3 +1,4 @@
// ACP stateful target driver tests cover ACP target state persistence and routing.
import { beforeEach, describe, expect, it, vi } from "vitest";
const resetMocks = vi.hoisted(() => ({

View File

@@ -1,3 +1,4 @@
// Approval tests cover channel plugin approval request formatting and dispatch.
import { describe, expect, it, vi } from "vitest";
import { resolveChannelApprovalAdapter, resolveChannelApprovalCapability } from "./approvals.js";

View File

@@ -1,3 +1,4 @@
// Binding routing tests cover channel binding selection and message routing behavior.
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import {
testing,

View File

@@ -1,3 +1,4 @@
// Binding target tests cover channel binding target extraction and validation.
import { afterEach, describe, expect, it, vi } from "vitest";
import {
ensureConfiguredBindingTargetReady,

View File

@@ -1,3 +1,4 @@
// Bundled load error tests cover diagnostics when bundled channel plugins fail to load.
import { describe, it, expect } from "vitest";
import { describeBundledChannelLoadError } from "./bundled.js";

View File

@@ -1,3 +1,4 @@
// Bundled root cache tests cover cached bundled channel root resolution.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Bundled shape guard tests cover bundled channel package metadata and export shape.
import { spawnSync } from "node:child_process";
import fs from "node:fs";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Channel plugin catalog tests cover plugin catalog entries and metadata normalization.
import { describe, expect, it } from "vitest";
import { getChannelPluginCatalogEntry } from "./catalog.js";

View File

@@ -1,3 +1,4 @@
// Chat target prefix tests cover channel target prefix parsing and display behavior.
import { describe, expect, it } from "vitest";
import {
createAllowedChatSenderMatcher,

View File

@@ -1,3 +1,4 @@
// Config helper tests cover channel plugin config merge and selection helpers.
import { describe, expect, it } from "vitest";
import { clearAccountEntryFields } from "./config-helpers.js";

View File

@@ -1,3 +1,4 @@
// Config schema tests cover channel plugin config schema validation and defaults.
import { describe, expect, it, vi } from "vitest";
import { z } from "zod";
import {

View File

@@ -1,3 +1,4 @@
// Configured state tests cover channel plugin configured-state detection and summaries.
import { createRequire } from "node:module";
import { describe, expect, it } from "vitest";
import {

View File

@@ -1,3 +1,4 @@
// Directory adapter tests cover channel directory adapter contracts and result normalization.
import { describe, expect, it } from "vitest";
import {
createChannelDirectoryAdapter,

View File

@@ -1,3 +1,4 @@
// Directory config helper tests cover config helpers for channel directory integrations.
import { describe, expect, it } from "vitest";
import {
createInspectedDirectoryEntriesLister,

View File

@@ -1,3 +1,4 @@
// Doctor contract API fast-path tests cover lightweight channel doctor contract loading.
import { describe, expect, it, vi } from "vitest";
const { loadBundledPluginPublicArtifactModuleSyncMock } = vi.hoisted(() => ({

View File

@@ -1,3 +1,4 @@
// Gateway auth bypass tests cover channel plugin paths allowed to skip gateway auth.
import { describe, expect, it, vi } from "vitest";
const { loadBundledPluginPublicArtifactModuleSyncMock } = vi.hoisted(() => ({

View File

@@ -1,3 +1,4 @@
// Group policy warning tests cover user-facing warnings for channel group access policy.
import { describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../../config/types.openclaw.js";
import {

View File

@@ -1,3 +1,4 @@
// Channel plugin helper tests cover shared plugin helper behavior and edge cases.
import { describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../../config/config.js";
import {

View File

@@ -1,3 +1,4 @@
// Legacy config tests cover channel plugin config compatibility and migration helpers.
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { LegacyConfigRule } from "../../config/legacy.shared.js";

View File

@@ -1,3 +1,4 @@
// Message action security tests cover channel message action authorization and validation.
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { jsonResult } from "../../agents/tools/common.js";
import type { OpenClawConfig } from "../../config/config.js";

View File

@@ -1,3 +1,4 @@
// Message action tests cover channel message action schema and invocation behavior.
import { Type } from "typebox";
import { afterEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../../config/config.js";

View File

@@ -1,3 +1,4 @@
// Message capability matrix tests cover channel message feature support across plugin surfaces.
import { afterEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../../config/config.js";
import type { ChannelMessageActionAdapter, ChannelPlugin } from "./types.js";

View File

@@ -1,3 +1,4 @@
// Message tool API tests cover channel message tool descriptors and runtime calls.
import { beforeEach, describe, expect, it, vi } from "vitest";
const { loadBundledPluginPublicArtifactModuleSyncMock } = vi.hoisted(() => ({

View File

@@ -1,3 +1,4 @@
// Module loader tests cover channel plugin module resolution and import failure handling.
import fs from "node:fs";
import { createRequire } from "node:module";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Package state probe tests cover channel plugin package install and runtime status probes.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Pairing adapter tests cover channel plugin device/account pairing adapter behavior.
import { describe, expect, it, vi } from "vitest";
import {
createLoggedPairingApprovalNotifier,

View File

@@ -1,3 +1,4 @@
// Persisted auth state tests cover channel plugin auth state serialization and recovery.
import { describe, expect, it } from "vitest";
import {
hasBundledChannelPersistedAuthState,

View File

@@ -1,3 +1,4 @@
// Read-only command default tests cover command defaulting for read-only channel plugins.
import { beforeEach, describe, expect, it, vi } from "vitest";
const loadPluginMetadataSnapshot = vi.hoisted(() => vi.fn());

View File

@@ -1,3 +1,4 @@
// Read-only channel tests cover read-only plugin registration and runtime behavior.
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath, pathToFileURL } from "node:url";

View File

@@ -1,3 +1,4 @@
// Registry tests cover channel plugin registry installation, lookup, and reset behavior.
import { afterEach, describe, expect, it, vi } from "vitest";
import { createEmptyPluginRegistry } from "../../plugins/registry-empty.js";
import type { PluginRegistry } from "../../plugins/registry.js";

View File

@@ -1,3 +1,4 @@
// Runtime forwarder tests cover channel plugin runtime method delegation and fallback handling.
import { describe, expect, it, vi } from "vitest";
import {
createRuntimeDirectoryLiveAdapter,

View File

@@ -1,3 +1,4 @@
// Session conversation fallback tests cover bundled plugin fallback for conversation sessions.
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { clearRuntimeConfigSnapshot, setRuntimeConfigSnapshot } from "../../config/io.js";
import { resetPluginRuntimeStateForTest } from "../../plugins/runtime.js";

View File

@@ -1,3 +1,4 @@
// Session conversation tests cover channel plugin conversation binding and session lookup.
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { clearRuntimeConfigSnapshot, setRuntimeConfigSnapshot } from "../../config/io.js";
import { resetPluginRuntimeStateForTest, setActivePluginRegistry } from "../../plugins/runtime.js";

View File

@@ -1,3 +1,4 @@
// Setup group access configure tests cover channel setup writes for group access config.
import { describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../../config/config.js";
import { configureChannelAccessWithAllowlist } from "./setup-group-access-configure.js";

View File

@@ -1,3 +1,4 @@
// Setup group access tests cover group access setup flow decisions and outputs.
import { describe, expect, it, vi } from "vitest";
import {
formatAllowlistEntries,

View File

@@ -1,3 +1,4 @@
// Setup helper import-safety tests cover lazy boundaries for channel plugin setup helpers.
import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures";
import { afterEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Setup helper tests cover channel setup helper outputs and lifecycle cleanup.
import { afterAll, beforeEach, describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../../config/config.js";
import { resetPluginRuntimeStateForTest, setActivePluginRegistry } from "../../plugins/runtime.js";

View File

@@ -1,3 +1,4 @@
// Setup promotion helper tests cover setup-result promotion into configured channel state.
import { beforeEach, describe, expect, it, vi } from "vitest";
const getBundledChannelPluginMock = vi.hoisted(() => vi.fn());

View File

@@ -1,3 +1,4 @@
// Setup wizard binary tests cover channel setup wizard binary selection and invocation.
import { describe, expect, it, vi } from "vitest";
import {
createCliPathTextInput,

View File

@@ -1,3 +1,4 @@
// Setup wizard helper tests cover channel setup step formatting and config writes.
import {
resolveSetupWizardAllowFromEntries,
resolveSetupWizardGroupAllowlist,

View File

@@ -1,3 +1,4 @@
// Setup wizard proxy tests cover proxying setup wizard calls through channel plugin facades.
import {
promptSetupWizardAllowFrom,
resolveSetupWizardAllowFromEntries,

View File

@@ -1,3 +1,4 @@
// Target parsing tests cover channel target syntax parsing and validation.
import { beforeEach, describe, expect, it } from "vitest";
import {
channelRouteTargetsMatchExact,

View File

@@ -1,3 +1,4 @@
// Target resolver tests cover channel plugin target resolution from user input and bindings.
import { describe, expect, it } from "vitest";
import {
buildUnresolvedTargetResults,

View File

@@ -1,3 +1,4 @@
// Thread binding API tests cover channel plugin thread binding contracts and helpers.
import { beforeEach, describe, expect, it, vi } from "vitest";
const { loadBundledPluginPublicArtifactModuleSyncMock } = vi.hoisted(() => ({

View File

@@ -1,3 +1,4 @@
// Threading helper tests cover channel thread metadata and reply-thread helper behavior.
import { describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../../config/config.js";
import {

View File

@@ -1,3 +1,4 @@
// TTS capability tests cover channel plugin text-to-speech capability detection.
import { afterEach, describe, expect, it } from "vitest";
import { createEmptyPluginRegistry } from "../../plugins/registry-empty.js";
import { setActivePluginRegistry } from "../../plugins/runtime.js";