Skip to content

Commit 6d1b145

Browse files
authored
fix(vitest): loosen onConsoleLog return type (#5337)
1 parent c3eb8de commit 6d1b145

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/vitest/src/types/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ export interface InlineConfig {
580580
*
581581
* Return `false` to ignore the log.
582582
*/
583-
onConsoleLog?: (log: string, type: 'stdout' | 'stderr') => false | void
583+
onConsoleLog?: (log: string, type: 'stdout' | 'stderr') => boolean | void
584584

585585
/**
586586
* Enable stack trace filtering. If absent, all stack trace frames

test/web-worker/vitest.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ export default defineConfig({
1313
},
1414
},
1515
onConsoleLog(log) {
16-
if (log.includes('Failed to load'))
17-
return false
16+
return !log.includes('Failed to load')
1817
},
1918
},
2019
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy