Skip to content

Commit 5a8f5ba

Browse files
committed
docs: fix issue from merge
1 parent 6c452f8 commit 5a8f5ba

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

docs/guide/migration.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,33 @@ export default defineConfig({
246246

247247
The naming of properties in `playwright` factory now also aligns with [Playwright documentation](https://playwright.dev/docs/api/class-testoptions#test-options-launch-options) making it easier to find.
248248

249+
### Reporter Updates
250+
251+
Reporter APIs `onCollected`, `onSpecsCollected`, `onPathsCollected`, `onTaskUpdate` and `onFinished` were removed. See [`Reporters API`](/advanced/api/reporters) for new alternatives. The new APIs were introduced in Vitest `v3.0.0`.
252+
253+
The `basic` reporter was removed as it is equal to:
254+
255+
```ts
256+
export default defineConfig({
257+
test: {
258+
reporters: [
259+
['default', { summary: false }]
260+
]
261+
}
262+
})
263+
```
264+
265+
The [`verbose`](/guide/reporters#verbose-reporter) reporter now prints test cases as a flat list. To revert to the previous behaviour, use `--reporter=tree`:
266+
267+
```ts
268+
export default defineConfig({
269+
test: {
270+
reporters: ['verbose'], // [!code --]
271+
reporters: ['tree'], // [!code ++]
272+
}
273+
})
274+
```
275+
249276
### Snapshots using custom elements print the shadow root
250277

251278
In Vitest 4.0 snapshots that include custom elements will print the shadow root contents. To restore the previous behavior, set the [`printShadowRoot` option](/config/#snapshotformat) to `false`.
@@ -277,32 +304,6 @@ exports[`custom element with shadow root 1`] = `
277304
</div>
278305
</body>"
279306
`
280-
281-
### Reporter Updates
282-
283-
Reporter APIs `onCollected`, `onSpecsCollected`, `onPathsCollected`, `onTaskUpdate` and `onFinished` were removed. See [`Reporters API`](/advanced/api/reporters) for new alternatives. The new APIs were introduced in Vitest `v3.0.0`.
284-
285-
The `basic` reporter was removed as it is equal to:
286-
287-
```ts
288-
export default defineConfig({
289-
test: {
290-
reporters: [
291-
['default', { summary: false }]
292-
]
293-
}
294-
})
295-
```
296-
297-
The [`verbose`](/guide/reporters#verbose-reporter) reporter now prints test cases as a flat list. To revert to the previous behaviour, use `--reporter=tree`:
298-
299-
```ts
300-
export default defineConfig({
301-
test: {
302-
reporters: ['verbose'], // [!code --]
303-
reporters: ['tree'], // [!code ++]
304-
}
305-
})
306307
```
307308

308309
### Deprecated APIs are Removed

0 commit comments

Comments
 (0)