chore(sync): mirror docs from openclaw/openclaw@d35ada2f54

This commit is contained in:
openclaw-docs-sync[bot] 2026-04-28 01:16:46 +00:00
parent 4b275a3255
commit 344160c3af
3 changed files with 8 additions and 13 deletions

View File

@ -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"
}

View File

@ -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

View File

@ -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`.