[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

fix!: remove `'basic'` reporter (#7884)

authored by

Ari Perkkiö and committed by
GitHub
(Jun 18, 2025, 10:06 AM +0300) 82fcf5d5 c666d149

+20 -71
-1
docs/advanced/reporters.md
··· 93 93 94 94 ### Built-in reporters: 95 95 96 - 1. `BasicReporter` 97 96 1. `DefaultReporter` 98 97 2. `DotReporter` 99 98 3. `JsonReporter`
+1 -1
docs/guide/cli-generated.md
··· 89 89 - **CLI:** `--reporter <name>` 90 90 - **Config:** [reporters](/config/#reporters) 91 91 92 - Specify reporters (default, basic, blob, verbose, dot, json, tap, tap-flat, junit, hanging-process, github-actions) 92 + Specify reporters (default, blob, verbose, dot, json, tap, tap-flat, junit, hanging-process, github-actions) 93 93 94 94 ### outputFile 95 95
+16
docs/guide/migration.md
··· 5 5 6 6 # Migration Guide 7 7 8 + ## Migrating to Vitest 4.0 {#vitest-4} 9 + 10 + ### Removed `reporters: 'basic'` 11 + 12 + Basic reporter is removed as it is equal to: 13 + 14 + ```ts 15 + export default defineConfig({ 16 + test: { 17 + reporters: [ 18 + ['default', { summary: false }] 19 + ] 20 + } 21 + }) 22 + ``` 23 + 8 24 ## Migrating to Vitest 3.0 {#vitest-3} 9 25 10 26 ### Test Options as a Third Argument
+1 -30
docs/guide/reporters.md
··· 141 141 Duration 1.26s (transform 35ms, setup 1ms, collect 90ms, tests 1.47s, environment 0ms, prepare 267ms) 142 142 ``` 143 143 144 - ### Basic Reporter 145 - 146 - The `basic` reporter is equivalent to `default` reporter without `summary`. 147 - 148 - :::code-group 149 - ```bash [CLI] 150 - npx vitest --reporter=basic 151 - ``` 152 - 153 - ```ts [vitest.config.ts] 154 - export default defineConfig({ 155 - test: { 156 - reporters: ['basic'] 157 - }, 158 - }) 159 - ``` 160 - ::: 161 - 162 - Example output using basic reporter: 163 - ```bash 164 - ✓ __tests__/file1.test.ts (2) 725ms 165 - ✓ __tests__/file2.test.ts (2) 746ms 166 - 167 - Test Files 2 passed (2) 168 - Tests 4 passed (4) 169 - Start at 12:34:32 170 - Duration 1.26s (transform 35ms, setup 1ms, collect 90ms, tests 1.47s, environment 0ms, prepare 267ms) 171 - ``` 172 - 173 144 ### Verbose Reporter 174 145 175 146 Verbose reporter is same as `default` reporter, but it also displays each individual test after the suite has finished. It also displays currently running tests that are taking longer than [`slowTestThreshold`](/config/#slowtestthreshold). Similar to `default` reporter, you can disable the summary by configuring the reporter. ··· 228 199 229 200 ### Dot Reporter 230 201 231 - Prints a single dot for each completed test to provide minimal output while still showing all tests that have run. Details are only provided for failed tests, along with the `basic` reporter summary for the suite. 202 + Prints a single dot for each completed test to provide minimal output while still showing all tests that have run. Details are only provided for failed tests, along with the summary for the suite. 232 203 233 204 :::code-group 234 205 ```bash [CLI]
-1
test/config/test/retry.test.ts
··· 5 5 return runVitest({ 6 6 include: ['fixtures/retry/retry.test.ts'], 7 7 config: 'fixtures/retry/vitest.config.ts', 8 - reporters: ['basic'], 9 8 testNamePattern, 10 9 }) 11 10 }
-2
test/core/test/exports.test.ts
··· 121 121 "viteVersion": "string", 122 122 }, 123 123 "./reporters": { 124 - "BasicReporter": "function", 125 124 "BenchmarkReporter": "function", 126 125 "BenchmarkReportsMap": "object", 127 126 "DefaultReporter": "function", ··· 278 277 "viteVersion": "string", 279 278 }, 280 279 "./reporters": { 281 - "BasicReporter": "function", 282 280 "BenchmarkReporter": "function", 283 281 "BenchmarkReportsMap": "object", 284 282 "DefaultReporter": "function",
-2
test/reporters/tests/configuration-options.test-d.ts
··· 5 5 type Configuration = NonNullable<NarrowToTestConfig<(Parameters<typeof defineConfig>[0])>> 6 6 7 7 test('reporters, single', () => { 8 - assertType<Configuration>({ reporters: 'basic' }) 9 8 assertType<Configuration>({ reporters: 'default' }) 10 9 assertType<Configuration>({ reporters: 'dot' }) 11 10 assertType<Configuration>({ reporters: 'hanging-process' }) ··· 24 23 test('reporters, multiple', () => { 25 24 assertType<Configuration>({ 26 25 reporters: [ 27 - 'basic', 28 26 'default', 29 27 'dot', 30 28 'hanging-process',
-1
test/watch/test/reporter-failed.test.ts
··· 4 4 describe.each([ 5 5 ['default', true], 6 6 ['default', false], 7 - ['basic', false], 8 7 ])('%s reporter with %s tty', (reporter, isTTY) => { 9 8 it('prints previously failed tests on rerun', async () => { 10 9 const { vitest } = await runVitest({
-1
packages/vitest/src/public/reporters.ts
··· 1 1 export { 2 - BasicReporter, 3 2 BenchmarkReporter, 4 3 BenchmarkReportsMap, 5 4 DefaultReporter,
-26
packages/vitest/src/node/reporters/basic.ts
··· 1 - import type { File } from '@vitest/runner' 2 - import type { Vitest } from '../core' 3 - import { BaseReporter } from './base' 4 - 5 - export class BasicReporter extends BaseReporter { 6 - constructor() { 7 - super() 8 - this.isTTY = false 9 - } 10 - 11 - onInit(ctx: Vitest): void { 12 - super.onInit(ctx) 13 - 14 - ctx.logger.deprecate( 15 - `'basic' reporter is deprecated and will be removed in Vitest v3.\n` 16 - + `Remove 'basic' from 'reporters' option. To match 'basic' reporter 100%, use configuration:\n${ 17 - JSON.stringify({ test: { reporters: [['default', { summary: false }]] } }, null, 2)}`, 18 - ) 19 - } 20 - 21 - reportSummary(files: File[], errors: unknown[]): void { 22 - // non-tty mode doesn't add a new line 23 - this.ctx.logger.log() 24 - return super.reportSummary(files, errors) 25 - } 26 - }
-4
packages/vitest/src/node/reporters/index.ts
··· 5 5 import type { HTMLOptions } from './html' 6 6 import type { JsonOptions } from './json' 7 7 import type { JUnitOptions } from './junit' 8 - import { BasicReporter } from './basic' 9 8 import { BlobReporter } from './blob' 10 9 import { DefaultReporter } from './default' 11 10 import { DotReporter } from './dot' ··· 18 17 import { VerboseReporter } from './verbose' 19 18 20 19 export { 21 - BasicReporter, 22 20 DefaultReporter, 23 21 DotReporter, 24 22 GithubActionsReporter, ··· 45 43 46 44 export const ReportersMap = { 47 45 'default': DefaultReporter as typeof DefaultReporter, 48 - 'basic': BasicReporter as typeof BasicReporter, 49 46 'blob': BlobReporter as typeof BlobReporter, 50 47 'verbose': VerboseReporter as typeof VerboseReporter, 51 48 'dot': DotReporter as typeof DotReporter, ··· 61 58 62 59 export interface BuiltinReporterOptions { 63 60 'default': DefaultReporterOptions 64 - 'basic': BaseOptions 65 61 'verbose': DefaultReporterOptions 66 62 'dot': BaseOptions 67 63 'json': JsonOptions
+2 -2
packages/vitest/src/node/reporters/utils.ts
··· 3 3 import type { ResolvedConfig } from '../types/config' 4 4 import type { Reporter } from '../types/reporter' 5 5 import type { BlobReporter } from './blob' 6 - import type { BasicReporter, BenchmarkBuiltinReporters, BenchmarkReporter, BuiltinReporters, DefaultReporter, DotReporter, GithubActionsReporter, HangingProcessReporter, JsonReporter, JUnitReporter, TapReporter } from './index' 6 + import type { BenchmarkBuiltinReporters, BenchmarkReporter, BuiltinReporters, DefaultReporter, DotReporter, GithubActionsReporter, HangingProcessReporter, JsonReporter, JUnitReporter, TapReporter } from './index' 7 7 import { BenchmarkReportsMap, ReportersMap } from './index' 8 8 9 9 async function loadCustomReporterModule<C extends Reporter>( ··· 35 35 function createReporters( 36 36 reporterReferences: ResolvedConfig['reporters'], 37 37 ctx: Vitest, 38 - ): Promise<Array<Reporter | DefaultReporter | BasicReporter | BlobReporter | DotReporter | JsonReporter | TapReporter | JUnitReporter | HangingProcessReporter | GithubActionsReporter>> { 38 + ): Promise<Array<Reporter | DefaultReporter | BlobReporter | DotReporter | JsonReporter | TapReporter | JUnitReporter | HangingProcessReporter | GithubActionsReporter>> { 39 39 const runner = ctx.runner 40 40 const promisedReporters = reporterReferences.map( 41 41 async (referenceOrInstance) => {