import { TestResult } from '@playwright/test/reporter'; /** * Playwright >= 1.51 attaches the error-context.md it writes for a failed test under this name, * with contentType `text/markdown`. */ export declare const ERROR_CONTEXT_ATTACHMENT_NAME = "error-context"; /** * Matches the server-side cap on `execution.error_context`. Truncating here keeps oversized page * snapshots from being rejected (or bloating the bulk request) while still sending what fits. */ export declare const ERROR_CONTEXT_MAX_LENGTH = 262144; /** * Trims `content` to at most `limit` characters, leaving room for a marker so the reader can tell * the text is incomplete. The result is never longer than `limit`. Pure — no I/O. */ export declare function truncateErrorContext(content: string, limit?: number): string; /** * Reads the error-context attachment for a finished test, if Playwright produced one. * * Returns null rather than throwing: a missing or unreadable file must never fail the result * submission. The attachment is left in place so it is still uploaded as a file as well. */ export declare function readErrorContext(attachments: TestResult['attachments'], limit?: number): Promise;