MCPcopy
hub / github.com/vitest-dev/vitest / getOutputFile

Function getOutputFile

packages/vitest/src/utils/config-helpers.ts:10–23  ·  view source on GitHub ↗
(
  config: PotentialConfig | undefined,
  reporter: BuiltinReporters | BenchmarkBuiltinReporters | 'html',
)

Source from the content-addressed store, hash-verified

8}
9
10export function getOutputFile(
11 config: PotentialConfig | undefined,
12 reporter: BuiltinReporters | BenchmarkBuiltinReporters | 'html',
13): string | undefined {
14 if (!config?.outputFile) {
15 return
16 }
17
18 if (typeof config.outputFile === 'string') {
19 return config.outputFile
20 }
21
22 return config.outputFile[reporter]
23}
24
25export function createDefinesScript(define: Record<string, any> | undefined): string {
26 if (!define) {

Callers 3

writeReportMethod · 0.90
onInitMethod · 0.90
onTestRunEndMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected