File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2323,9 +2323,15 @@ Retry the test specific number of times if it fails.
2323
2323
2324
2324
### onConsoleLog<NonProjectOption />
2325
2325
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
+ ```
2327
2333
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 .
2329
2335
2330
2336
Can be useful for filtering out logs from third - party libraries .
2331
2337
You can’t perform that action at this time.
0 commit comments