UNPKG

histoire

Version:

A fast story book powered by Vite

24 lines • 1.15 kB
import type { HistoireTestDefinition, StoryFile } from '@histoire/shared'; import type { SessionStoryFile } from './types.js'; /** A mounted variant with its collected tests, owned by the caller until `cleanup`. */ export interface VariantSession { file: StoryFile; definitions: HistoireTestDefinition[]; cleanup: () => void; } export interface CreateVariantSessionOptions { /** Positions the render mount off the viewport (see `VariantTestSessionOptions`). */ offscreenRenderMount: boolean; /** Maximum time allowed for each mount phase. */ mountTimeoutMs: number; } /** * Mounts a variant (bootstrap mount, then render mount) and collects the tests * every mount phase registered. * @param storyFile The mapped story file and its import-time registrations. * @param variantId The variant to mount. * @param options Mount options for this session. * @returns The mounted session; the caller MUST call `cleanup()`. */ export declare function createVariantSession(storyFile: SessionStoryFile, variantId: string, options: CreateVariantSessionOptions): Promise<VariantSession>; //# sourceMappingURL=session.d.ts.map