export { expectLog }; export declare const Logs: { add: typeof add; flushLogs: typeof flushLogs; logErrorsAndWarnings: typeof logErrorsAndWarnings; clearLogs: typeof clearLogs; hasFailureLog: typeof hasFailureLog; logEagerly: false | "all" | "logs"; }; export type { LogSource }; type LogSource = 'stdout' | 'stderr' | 'Browser Error' | 'Browser Warning' | 'Browser Log' | 'Playwright' | 'run()' | 'run() failure' | 'test()' | 'Connection Error'; type LogEntry = { logSource: LogSource; logText: string; logInfo: string; logTimestamp: string; isNotFailure: boolean; loggedAfterExit: boolean; }; declare function hasFailureLog({ includeBrowserWarnings, includeStderr, }: { includeBrowserWarnings: boolean; includeStderr: boolean; }): boolean; declare function clearLogs(): void; declare function logErrorsAndWarnings(): void; declare function flushLogs(): void; declare function add({ logSource, logText, logInfo, loggedAfterExit, }: { logSource: LogSource; logText: string; logInfo?: string; loggedAfterExit?: boolean; }): void; /** * Expect a log to be printed. * * @param pattern String or RegExp to search for in logs. * * @param filter Only search in certain types of logs, e.g. only in browser- or server-side logs. * * @param allLogs Search in all logs, including the logs of previous tests as well as the logs of the setup/prepare scripts. Usually used in combination with the `filter` parameter. */ declare function expectLog(pattern: string | RegExp, { filter: logFilter, allLogs }?: { filter?: (logEntry: LogEntry) => boolean; allLogs?: boolean; }): void;