Skip to main content
Tests import one entry, and a preset in the test setup:
Each symbol’s page below is generated from the SDK’s own TypeScript declarations. The walkthrough is on Testing with the SDK.

Presets

@tappify/extension-sdk/testing/vitest and @tappify/extension-sdk/testing/jest are side-effect modules. Importing one installs the host CSS variables and registers the matchers.

Rendering

The mock bridge

Matchers

tapMatchers and registerTapMatchers. The presets register them for you. Each one takes a MatcherTarget and returns a MatcherResult.

Testing your server

Validators

validateMetricsResponse checks a metrics response against your declared metric definitions; validateToolResponse checks a tool result against its declared shape. Both return the problems as strings, so a test fails the way doctor would.

Fixtures

fixtures, typed TapFixtures, is the sandbox data the portal preview also uses, so a component behaves the same in both. The pieces are fixtureProject, fixtureApps, fixtureReleases, fixtureKeywords, fixtureListings, fixtureReviews, fixtureCrashes, fixtureRevenue, fixtureSeries and answerFixtureQuery. installHostTheme puts the host’s CSS variables on a root, for a test that renders outside renderWithTap.