Skip to content

Commit 409deee

Browse files
committed
docs: add entity to docs
1 parent e5bfa17 commit 409deee

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/config/index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,9 +2323,15 @@ Retry the test specific number of times if it fails.
23232323

23242324
### onConsoleLog<NonProjectOption />
23252325

2326-
- **Type**: `(log: string, type: 'stdout' | 'stderr') => boolean | void`
2326+
```ts
2327+
function onConsoleLog(
2328+
log: string,
2329+
type: 'stdout' | 'stderr',
2330+
entity: TestModule | TestSuite | TestCase | undefined,
2331+
): boolean | void
2332+
```
23272333

2328-
Custom handler for `console.log` in tests. If you return `false`, Vitest will not print the log to the console.
2334+
Custom handler for `console` methods in tests. If you return `false`, Vitest will not print the log to the console. Note that Vitest ignores all other falsy values.
23292335

23302336
Can be useful for filtering out logs from third-party libraries.
23312337

0 commit comments

Comments
 (0)