diff --git a/packages/ui/node/reporter.ts b/packages/ui/node/reporter.ts index 82945f7d4289..50be230863f0 100644 --- a/packages/ui/node/reporter.ts +++ b/packages/ui/node/reporter.ts @@ -1,11 +1,10 @@ import type { - File, ModuleGraphData, - Reporter, + RunnerTestFile, SerializedConfig, - Vitest, } from 'vitest' -import type { HTMLOptions } from 'vitest/node' +import type { HTMLOptions, Vitest } from 'vitest/node' +import type { Reporter } from 'vitest/reporters' import { promises as fs } from 'node:fs' import { fileURLToPath } from 'node:url' import { promisify } from 'node:util' @@ -34,7 +33,7 @@ function getOutputFile(config: PotentialConfig | undefined) { interface HTMLReportData { paths: string[] - files: File[] + files: RunnerTestFile[] config: SerializedConfig moduleGraph: Record> unhandledErrors: unknown[] @@ -75,7 +74,7 @@ export default class HTMLReporter implements Reporter { const browser = resolvedConfig.browser.enabled && resolvedConfig.browser.ui result.moduleGraph[projectName] ??= {} result.moduleGraph[projectName][file.filepath] = await getModuleGraph( - this.ctx as any, + this.ctx, projectName, file.filepath, browser, diff --git a/packages/ui/node/tsconfig.json b/packages/ui/node/tsconfig.json new file mode 100644 index 000000000000..d08d83651e2b --- /dev/null +++ b/packages/ui/node/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../tsconfig.base.json", + "include": ["./*.ts"] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 28a1fd4b24c6..7969262c3a68 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -25,6 +25,7 @@ "vitest": ["./packages/vitest/src/public/index.ts"], "vitest/globals": ["./packages/vitest/globals.d.ts"], "vitest/node": ["./packages/vitest/src/public/node.ts"], + "vitest/reporters": ["./packages/vitest/src/public/reporters.ts"], "vitest/execute": ["./packages/vitest/src/public/execute.ts"], "vitest/config": ["./packages/vitest/src/public/config.ts"], "vitest/coverage": ["./packages/vitest/src/public/coverage.ts"],