(content: string) => boolean | voidundefinedCustom 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.
import { defineConfig } from '@rstest/core';
export default defineConfig({
onConsoleLog: (log) => log.includes('test'),
});
When disableConsoleIntercept is set to true, onConsoleLog will be ignored.