Skip to content

Test and validate your plugin

Validate a plugin in layers. Each layer catches a different class of failure:

  1. Type-check your plugin project against Svelte and the published npm SDK.
  2. Test plugin logic and interfaces with Node-based logic tests and capability-specific checks you add.
  3. Build and validate release artifacts as the exact files Phials will install.
  4. 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:

Terminal window
npm run check
npm test
npm run build
npm run release:verify

A 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.

This article includes AI-assisted content.

Documentation is licensed under CC BY 4.0. Phoundry names and marks remain reserved.