vitest-dev / vitest-dev/vitest

Disable summary for default reporter via cli

Open
#8,070 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat: reporters
Dominant language
TypeScript
Stars
17.1k
Forks
2k
Avg merge
1d 22h
Merged PRs (30d)
94

Description

Clear and concise description of the problem

We use CLI to run tests in CI
vitest --run --reporter=basic --reporter=github-actions

But the basic reporter is deprecated and tests output

DEPRECATED  'basic' reporter is deprecated and will be removed in Vitest v3.
Remove 'basic' from 'reporters' option. To match 'basic' reporter 100%, use configuration:
{
 "test": {
   "reporters": [
     [
       "default",
       {
         "summary": false
       }
     ]
   ]
 }
}

It is much easier to configure Vitest via CLI rather than using a config file in our pipelines. So we would like to configure the reporter via CLI.

Suggested solution

Add CLI option --reporter.summary. This option may affect all reporters

Alternative

Or add options parsing and matching them with reporters by name, for example --reporter.default.summary=true, --reporter.verbose.summary=false

This format may work for other reporter options in the future

Additional context

No response

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Vitest's CLI parsing for the --reporter option and how reporter configuration reaches the default reporter. Compare the proposed global and reporter-specific option formats, then verify the example command. The work is done when the selected CLI form disables the default reporter summary without requiring a config file and its behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.