We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vitest-dev
sheremet-va
antfu
patak-dev
Learn more about funding links in repositories.
Report abuse
onConsoleLog
1 parent c3eb8de commit 6d1b145Copy full SHA for 6d1b145
packages/vitest/src/types/config.ts
@@ -580,7 +580,7 @@ export interface InlineConfig {
580
*
581
* Return `false` to ignore the log.
582
*/
583
- onConsoleLog?: (log: string, type: 'stdout' | 'stderr') => false | void
+ onConsoleLog?: (log: string, type: 'stdout' | 'stderr') => boolean | void
584
585
/**
586
* Enable stack trace filtering. If absent, all stack trace frames
test/web-worker/vitest.config.ts
@@ -13,8 +13,7 @@ export default defineConfig({
13
},
14
15
onConsoleLog(log) {
16
- if (log.includes('Failed to load'))
17
- return false
+ return !log.includes('Failed to load')
18
19
20
})
0 commit comments