mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
docs: document auto reply reply tests
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Tests reply payload construction and metadata propagation from agent runs.
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { resetPluginRuntimeStateForTest, setActivePluginRegistry } from "../../plugins/runtime.js";
|
||||
import { createTestRegistry } from "../../test-utils/channel-plugins.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests queued reply runtime secret resolution for agent and channel scopes.
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests agent runner utility decisions for fallbacks, channels, and reasoning tags.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { FollowupRun } from "./queue.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests allowlist command edits across legacy and scoped channel configuration.
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests background side-question command routing and typing controller integration.
|
||||
import { describe, expect, it, vi, beforeEach } from "vitest";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests session export command packaging, filesystem writes, and prompt bundle capture.
|
||||
import path from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { HandleCommandsParams } from "./commands-types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests info-style commands that report context, status, skills, and trajectory exports.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { resolveSessionAgentId } from "../../agents/agent-scope.js";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests model command output, catalog loading, and provider auth status rendering.
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { testing as cliBackendsTesting } from "../../agents/cli-backends.js";
|
||||
import type { ChannelPlugin } from "../../channels/plugins/types.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Tests slash command parsing boundaries, defaults, and invalid-action handling.
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { parseSlashCommandOrNull } from "./commands-slash-parse.js";
|
||||
|
||||
describe("parseSlashCommandOrNull", () => {
|
||||
@@ -15,7 +15,10 @@ describe("parseSlashCommandOrNull", () => {
|
||||
});
|
||||
|
||||
it("returns the default action on an empty body", () => {
|
||||
const result = parseSlashCommandOrNull("/config", "/config", { ...opts, defaultAction: "show" });
|
||||
const result = parseSlashCommandOrNull("/config", "/config", {
|
||||
...opts,
|
||||
defaultAction: "show",
|
||||
});
|
||||
expect(result).toEqual({ ok: true, action: "show", args: "" });
|
||||
});
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests shared subagent command text extraction and assistant marker cleanup.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { extractMessageText } from "./commands-subagents-text.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests text-to-speech command configuration, preference persistence, and summaries.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests model picker item construction and provider endpoint labeling.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
buildModelPickerItems,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests ACP dispatch abort behavior and emitted lifecycle hooks.
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import type {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests follow-up runner delivery, transcript persistence, and no-reply contracts.
|
||||
import fs from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests prepared reply queue state resolution before get-reply starts a run.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { resolvePreparedReplyQueueState } from "./get-reply-run-queue.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests reset hook fallback behavior inside the get-reply directive pipeline.
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
buildNativeResetContext,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests group prompt helpers and lazy runtime loading for group metadata.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import { resetPluginRuntimeStateForTest } from "../../plugins/runtime.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests origin routing helpers that preserve message provider, account, and target ids.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
resolveOriginAccountId,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests pending tool task drain ordering, settlement, and failure handling.
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { drainPendingToolTasks } from "./pending-tool-task-drain.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests follow-up queue message-id dedupe and drain scheduling behavior.
|
||||
import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import type { FollowupRun, QueueSettings } from "./queue.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests reply-to threading mode resolution across global and plugin config.
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import { setActivePluginRegistry } from "../../plugins/runtime.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests how session delivery preserves previous channel and target routing state.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveLastChannelRaw, resolveLastToRaw } from "./session-delivery.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests source reply delivery visibility across message tool and visible reply modes.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { OpenClawConfig } from "../../config/types.openclaw.js";
|
||||
import type { CommandTurnContext } from "../command-turn-context.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Tests stripping untrusted inbound metadata while preserving user-visible content.
|
||||
import { describe, it, expect } from "vitest";
|
||||
import type { TemplateContext } from "../templating.js";
|
||||
import { buildInboundUserContextPrefix } from "./inbound-meta.js";
|
||||
|
||||
Reference in New Issue
Block a user