UNPKG

histoire

Version:

A fast story book powered by Vite

31 lines • 1.7 kB
import type { HistoireTestRunSummary, ServerStoryFile } from '@histoire/shared'; import type { StoryCollectionFailure } from '../story-collection/index.js'; import type { RunHistoireTestsOptions } from './types.js'; /** * Fails the run when a story the caller explicitly asked for could not be * collected. * * Tolerating an unrelated broken story is a convenience; tolerating the very * story the user targeted would answer "no tests matched" to a request we * simply failed to honour. * @param failures Stories that failed to collect. * @param targetStoryFiles The story files this run was narrowed down to. * @param options The run options carrying the explicit filters. */ export declare function assertTargetedStoriesCollected(failures: StoryCollectionFailure[], targetStoryFiles: ServerStoryFile[], options: RunHistoireTestsOptions): void; /** * Warns about every story that could not be collected, naming it and its error. * @param failures Stories that failed to collect. */ export declare function warnAboutUncollectedStories(failures: StoryCollectionFailure[]): void; /** * Records the uncollected stories in the run summary and marks the run failed. * * A story that never executed may well have registered tests, so a run that * skipped it cannot honestly report success — that is exactly the silent * false-green the browser-based eligibility check exists to prevent. * @param summary The summary of the tests that did run. * @param failures Stories that failed to collect. */ export declare function withUncollectedStories(summary: HistoireTestRunSummary, failures: StoryCollectionFailure[]): HistoireTestRunSummary; //# sourceMappingURL=uncollected.d.ts.map