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 published npm SDK.
- Test plugin logic and interfaces with Node-based logic tests and capability-specific checks you add.
- 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 checknpm testnpm run buildnpm run release:verifyA clean run checks source types, the tests you have, manifest and basic bundle identity, and the recorded artifact bytes. The example does not include a provider or lifecycle harness. 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.