mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:30:47 +00:00
docs(plugins): clarify runtime config access
This commit is contained in:
@@ -94,6 +94,14 @@ plugin calls a capability API it does not own. For example,
|
||||
`api.registerMemoryCapability(...)` requires the plugin manifest or exported
|
||||
entry to declare `kind: "memory"`.
|
||||
|
||||
### Testing runtime config access
|
||||
|
||||
Prefer the shared plugin runtime mock from the repo test helpers when testing
|
||||
bundled plugins. Its deprecated `runtime.config.loadConfig()` and
|
||||
`runtime.config.writeConfigFile(...)` mocks throw by default so tests catch new
|
||||
usage of compatibility APIs. Override those mocks only when the test is
|
||||
explicitly covering legacy compatibility behavior.
|
||||
|
||||
### Unit testing a channel plugin
|
||||
|
||||
```typescript
|
||||
|
||||
Reference in New Issue
Block a user