Skip to content

ObsidianPluginVitestReporter

One entry of a vitest reporters list: the name of a built-in reporter ('default', 'junit', 'minimal', …) or a reporter instance.

Spelled out rather than derived from vitest’s own option type, whose parts (ReporterName, InlineReporter) are internal to vitest and exported from none of its entry points. Naming the two shapes directly keeps ObsidianPluginVitestConfigContext.reporters a plain array a caller pushes onto — the way ObsidianPluginVitestConfigContext.coverageExclude already is — which the option type itself cannot be, because it is a union of an array with a single value. Vitest’s third accepted shape, a [name, options] tuple, is deliberately left out: nothing in the fleet uses one, and a caller who needs it can still pass the whole list through editContext.

Import:

import type { ObsidianPluginVitestReporter } from 'obsidian-dev-utils/script-utils/test-runners/vitest-config';

Signature:

export type ObsidianPluginVitestReporter

Signature:

type ObsidianPluginVitestReporter = Reporter | string

Type: Reporter | string


Links to this page: