(options?: HtmlReportOptions)
| 140 | } |
| 141 | |
| 142 | export function writeHtmlReport(options?: HtmlReportOptions): string { |
| 143 | const reportDir = options?.reportDir ?? defaultReportDir(); |
| 144 | mkdirSync(reportDir, { recursive: true }); |
| 145 | const title = options?.title ?? 'server-e2e report'; |
| 146 | const events = readReportEvents(reportDir); |
| 147 | const htmlPath = join(reportDir, 'index.html'); |
| 148 | writeFileSync(htmlPath, renderHtml(title, events)); |
| 149 | return htmlPath; |
| 150 | } |
| 151 | |
| 152 | export async function fetchWithReport( |
| 153 | input: Parameters<typeof fetch>[0], |
no test coverage detected