mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
docs: document support test files
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Channel config example tests validate channel configuration snippets in docs.
|
||||
import { spawnSync } from "node:child_process";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// ClawHub plugin docs tests validate plugin documentation examples.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Config path docs tests validate documented config path references.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Environment docs tests validate documented environment variable references.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Cloud secret install docs tests validate documented cloud secret setup.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Plugin documentation example tests validate plugin snippets from docs.
|
||||
import { spawnSync } from "node:child_process";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Slash command docs tests validate documented slash command references.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// CI changed scope tests cover script detection of changed files and lanes.
|
||||
import { execFileSync } from "node:child_process";
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Control UI i18n report tests cover locale report generation.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
filterRawCopyEntries,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Control UI i18n script tests cover locale extraction and validation.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
findPlaceholderMismatches,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Docs link audit tests cover documentation link validation behavior.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Codex CI auth script tests cover generated auth fixture files.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Codex CI config script tests cover generated CI configuration files.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Plugin version sync tests cover script updates to plugin package versions.
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Live media script tests cover live media test command construction.
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const loadShellEnvFallbackMock = vi.fn();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Test project script tests cover fixture project discovery and validation.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Agent database path helpers resolve per-agent persisted database paths.
|
||||
import path from "node:path";
|
||||
import { normalizeAgentId } from "../routing/session-key.js";
|
||||
import { resolveOpenClawStateSqliteDir } from "./openclaw-state-db.paths.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// OpenClaw agent database tests cover agent-scoped DB storage and migrations.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// OpenClaw agent database stores agent-scoped persisted runtime state.
|
||||
import { chmodSync, existsSync, mkdirSync, statSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import type { DatabaseSync } from "node:sqlite";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// State database path helpers resolve shared OpenClaw state DB paths.
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { isMainThread, threadId } from "node:worker_threads";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// OpenClaw state database tests cover state DB migrations and persistence.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// OpenClaw state database manages shared persisted state and migrations.
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { chmodSync, existsSync, mkdirSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// SQLite schema test support reads schema files for shape assertions.
|
||||
import { readFileSync } from "node:fs";
|
||||
import { DatabaseSync } from "node:sqlite";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Network interface test helpers mock OS network interface state.
|
||||
import os from "node:os";
|
||||
import type { NetworkInterfacesSnapshot } from "../infra/network-interfaces.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Resolve target error helpers share common route-target validation cases.
|
||||
import { expect, it } from "vitest";
|
||||
|
||||
// Shared resolve-target negative cases used by messaging/channel tests. The
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// SSRF test helpers mock network protections for request validation tests.
|
||||
import { vi } from "vitest";
|
||||
import { normalizeHostname } from "../infra/net/hostname.js";
|
||||
import * as ssrf from "../infra/net/ssrf.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// State dir environment tests cover isolated state directory env helpers.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// State dir environment helpers isolate state paths during tests.
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Temporary directory helper tests cover temp directory cleanup behavior.
|
||||
import fsSync from "node:fs";
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Temporary directory helpers create and clean up isolated test directories.
|
||||
import fsSync from "node:fs";
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Windows command shim helpers create test shims for Windows command execution.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Workspace test helpers build isolated workspace directories for tests.
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
Reference in New Issue
Block a user