Test and validate your plugin
Validate a plugin in layers. Each layer catches a different class of failure:
- Type-check your plugin project against Svelte and the synchronized public SDK.
- Test plugin logic and interfaces with deterministic logic, provider, component, accessibility, and representative-file tests.
- Build and validate release artifacts as the exact files Phials will install.
- Verify permissions and runtime compatibility in an isolated Phials Home with both compatible and deliberately incompatible manifests.
Run the complete source and artifact gate from the plugin project root:
npm run check
npm run test:run
npm run build
npm run validateA clean run proves that the source agrees with the public SDK, deterministic behavior passes, and the release artifact set is structurally valid. It does not prove that the plugin activates with its real permissions and compatibility declarations. The installed-runtime checks provide that final evidence.
Match tests to plugin capabilities
Every plugin should test:
- its exported PhialsPlugin identity and lifecycle
- each provider’s matching, availability, and failure behavior
- permission-gated operations it actually calls
- durable settings or data across reload and restart when applicable
- release artifacts produced from a clean checkout
Add capability-specific cases from the relevant Add capabilities hub. A file viewer needs representative files and destination states; a command needs visible and disabled contexts; a panel or tab needs mount, remount, and finalization behavior.
For the repeatable local lifecycle after validation, use Run your plugin locally.