histoire
Version:
A fast story book powered by Vite
23 lines (22 loc) • 646 B
JavaScript
/**
* No-op reporter used to keep successful collection passes fully silent.
*
* Collection failures are surfaced by Histoire after the run via
* `analyzeCollectionRun`, so Vitest does not need to print anything here.
*/
export class HistoireCollectionReporter {
}
/**
* Builds the Vitest CLI flags used by browser story collection runs.
*/
export function getCollectionVitestCliOptions(debugBrowser = !!process.env.HST_DEBUG_BROWSER) {
if (debugBrowser) {
return {
reporters: ['verbose'],
};
}
return {
reporters: [new HistoireCollectionReporter()],
silent: 'passed-only',
};
}