diff --git a/docs/advanced/api/vitest.md b/docs/advanced/api/vitest.md index 54bfc825a268..cb8582ba970f 100644 --- a/docs/advanced/api/vitest.md +++ b/docs/advanced/api/vitest.md @@ -226,7 +226,7 @@ This method can be slow because it needs to filter `--changed` flags. Do not use function mergeReports(directory?: string): Promise ``` -Merge reports from multiple runs located in the specified directory (`--merge-reports` if not specified). This value can also be set on `config.mergeReports` (by default, it will read `.vitest-reports` folder). +Merge reports from multiple runs located in the specified directory (value from `--merge-reports` if not specified). This value can also be set on `config.mergeReports` (by default, it will read `.vitest-reports` folder). Note that the `directory` will always be resolved relative to the working directory. diff --git a/packages/vitest/src/node/cli/cli-config.ts b/packages/vitest/src/node/cli/cli-config.ts index 48a27ad7578a..57f7f0186bc2 100644 --- a/packages/vitest/src/node/cli/cli-config.ts +++ b/packages/vitest/src/node/cli/cli-config.ts @@ -802,7 +802,7 @@ export const cliOptionsConfig: VitestCLIOptions = { }, mergeReports: { description: - 'Paths to blob reports directory. If this options is used, Vitest won\'t run any tests, it will only report previously recorded tests', + 'Path to a blob reports directory. If this options is used, Vitest won\'t run any tests, it will only report previously recorded tests', argument: '[path]', transform(value) { if (!value || typeof value === 'boolean') { diff --git a/packages/vitest/src/node/core.ts b/packages/vitest/src/node/core.ts index 3b7f018a62ea..927c2005efaf 100644 --- a/packages/vitest/src/node/core.ts +++ b/packages/vitest/src/node/core.ts @@ -433,7 +433,7 @@ export class Vitest { } /** - * Merge reports from multiple runs located in the specified directory (`--merge-reports` by default). + * Merge reports from multiple runs located in the specified directory (value from `--merge-reports` if not specified). */ public async mergeReports(directory?: string): Promise { if (this.reporters.some(r => r instanceof BlobReporter)) {