UNPKG

histoire

Version:

A fast story book powered by Vite

21 lines • 1.2 kB
import type { HistoireTestRunSummary } from '@histoire/shared'; import type { TestModule } from 'vitest/node'; import type { GeneratedSpecFile } from './types.js'; /** * Creates the summary of a run that executed no test at all. */ export declare function createEmptyTestSummary(): HistoireTestRunSummary; /** * Turns the Vitest test modules of a run into a Histoire run summary. * * Each module is mapped back to its story/variant through the generated spec * path, so results reach the right variant in the app. Errors raised outside * test cases never discard the other results: module errors and unhandled * errors tagged with their spec become a failed {@link HISTOIRE_VARIANT_ERROR_TEST_NAME} * case of that variant, the remaining unhandled errors fail the run as a whole. * @param testModules The test modules Vitest executed. * @param specFiles The specs generated for this run. * @param unhandledErrors Errors Vitest caught outside test cases (`vitest.state.getUnhandledErrors()`). */ export declare function summarizeResults(testModules: TestModule[], specFiles: GeneratedSpecFile[], unhandledErrors?: unknown[]): HistoireTestRunSummary; //# sourceMappingURL=summary.d.ts.map