From 344160c3af13fc2c4287a34515b2346fef3f06c2 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Tue, 28 Apr 2026 01:16:46 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@d35ada2f5439eeb1a98f2fda7c9fed723ebc0686 --- .openclaw-sync/source.json | 4 ++-- docs/plugins/sdk-testing.md | 15 +++++---------- docs/reference/test.md | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 847b42fbf..f423e0289 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "a66605bf23a715de7dbe9f0de6ddeec12ae958fe", - "syncedAt": "2026-04-28T01:13:32.408Z" + "sha": "d35ada2f5439eeb1a98f2fda7c9fed723ebc0686", + "syncedAt": "2026-04-28T01:15:12.257Z" } diff --git a/docs/plugins/sdk-testing.md b/docs/plugins/sdk-testing.md index 84ac207e3..4009410c0 100644 --- a/docs/plugins/sdk-testing.md +++ b/docs/plugins/sdk-testing.md @@ -19,8 +19,6 @@ plugins. ## Test utilities -**Compatibility import:** `openclaw/plugin-sdk/testing` - **Plugin API mock import:** `openclaw/plugin-sdk/plugin-test-api` **Channel contract import:** `openclaw/plugin-sdk/channel-contract-testing` @@ -40,8 +38,7 @@ plugins. **Generic fixture import:** `openclaw/plugin-sdk/test-fixtures` Prefer the focused subpaths below for new plugin tests. The broad -`openclaw/plugin-sdk/testing` barrel remains for compatibility with older tests -and helpers that have not moved to a narrower documented surface yet. +`openclaw/plugin-sdk/testing` barrel is legacy compatibility only. ```typescript import { @@ -121,17 +118,15 @@ broad `plugin-sdk/testing` compatibility barrel, repo `src/**` files, or repo ### Types -The testing subpath also re-exports types useful in test files: +Focused testing subpaths also re-export types useful in test files: ```typescript import type { ChannelAccountSnapshot, ChannelGatewayContext, - OpenClawConfig, - PluginRuntime, - RuntimeEnv, - MockFn, -} from "openclaw/plugin-sdk/testing"; +} from "openclaw/plugin-sdk/channel-contract"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { MockFn, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime"; ``` ## Testing target resolution diff --git a/docs/reference/test.md b/docs/reference/test.md index 78084f292..3efba097d 100644 --- a/docs/reference/test.md +++ b/docs/reference/test.md @@ -18,7 +18,7 @@ title: "Tests" - Test wrapper runs end with a short `[test] passed|failed|skipped ... in ...` summary. Vitest's own duration line stays the per-shard detail. - Full, extension, and include-pattern shard runs update local timing data in `.artifacts/vitest-shard-timings.json`; later whole-config runs use those timings to balance slow and fast shards. Include-pattern CI shards append the shard name to the timing key, which keeps filtered shard timings visible without replacing whole-config timing data. Set `OPENCLAW_TEST_PROJECTS_TIMINGS=0` to ignore the local timing artifact. - Selected `plugin-sdk` and `commands` test files now route through dedicated light lanes that keep only `test/setup.ts`, leaving runtime-heavy cases on their existing lanes. -- Source files with sibling tests map to that sibling before falling back to wider directory globs. Helper edits under `test/helpers/channels`, `src/plugin-sdk/test-helpers`, and `src/plugins/contracts` use a local import graph to run importing tests instead of broad-running every shard when the dependency path is precise. +- Source files with sibling tests map to that sibling before falling back to wider directory globs. Helper edits under `src/channels/plugins/contracts/test-helpers`, `src/plugin-sdk/test-helpers`, and `src/plugins/contracts` use a local import graph to run importing tests instead of broad-running every shard when the dependency path is precise. - `auto-reply` now also splits into three dedicated configs (`core`, `top-level`, `reply`) so the reply harness does not dominate the lighter top-level status/token/helper tests. - Base Vitest config now defaults to `pool: "threads"` and `isolate: false`, with the shared non-isolated runner enabled across the repo configs. - `pnpm test:channels` runs `vitest.channels.config.ts`.