onConsoleLog
- Type:
(content: string) => boolean | void - Default:
undefined
Custom handler for console log in tests, which is helpful for filtering out logs from third-party libraries.
If you return false, Rstest will not print the log to the console.
rstest.config.ts
Note
When disableConsoleIntercept is set to true, onConsoleLog will not take effect.
Silencing console logs
You can silence console logs by returning false in the onConsoleLog handler.
rstest.config.ts