testing library

Test kit for Vantage plugin authors.

Provides runVantagePluginContractTests — the shared contract suite every plugin (first- and third-party) should pass — and FakeVantageScope, a controllable scope for widget-testing a plugin in isolation.

Classes

FakeVantageScope
A controllable VantageScope for testing a plugin without mounting a full Vantage. Mutating its state notifies listeners, like the real scope.

Functions

expectVantageEventSourceIsBroadcast(EventSource source) → void
Asserts source exposes a broadcast stream. The host holds one subscription and panels may hold more, so a single-subscription controller would make the second listener throw at runtime.
expectVantageExportArtifactsSafe(List<VantageExportArtifact> artifacts) → void
Asserts artifacts are safe to place in an exported bug bundle: bundle-relative filenames that are non-empty, unique and traversal-free, and text payloads that the producer already redacted (defence in depth — the host pipeline redacts again).
runVantagePluginContractTests(String description, VantagePlugin create()) → void
Runs the shared contract tests every VantagePlugin must satisfy. Call from a plugin's own test file: