Skip to content
HomePagesHomePages template kit

buildFixtureSet

Derives a section's full fixture set from its `fixtures.ts` module: a `"typical"` fixture from `base`, then one per `states` entry (id = the state's key).

Derives a section’s full fixture set from its fixtures.ts module: a "typical" fixture from base, then one per states entry (id = the state’s key). Entries are emitted as-is, WITHOUT merging — the resolver already decided every slot’s final value for each entry, so reinstating a value an entry’s own resolution omitted would silently undo that decision.

schema is no longer read: every variant axis is already resolved at defineFixtures time. It stays in the signature because every caller has it to hand and buildInvariantFixtures still needs it for the nullability pass.

Import from @homepages/template-kit.

function buildFixtureSet(input: { schema: SchemaForBuild; module: ResolvedFixtureModule; selfAnchor?: string; }): ResolvedFixture[]
Name Type Required Description
input `{
schema: SchemaForBuild;
module: ResolvedFixtureModule;
// Optional: the section’s resolved in-page id (its meta.anchor ?? name),
// threaded into each fixture’s nav.selfAnchor. Defaults to “” for callers
// that only exercise slots/variants (e.g. variant tests) — loadSectionBundle
// always supplies the real value.
selfAnchor?: string;
}` required

ResolvedFixture[]