docs(plugins): clarify runtime config access

This commit is contained in:
Peter Steinberger
2026-04-27 12:52:05 +01:00
parent 9d5a211019
commit a041ea7ca7
4 changed files with 14 additions and 5 deletions

View File

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