mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Persist test summary on disk
This commit is contained in:
parent
c9b3d0e2bd
commit
83b7f42d2d
19 changed files with 1284 additions and 3655 deletions
|
|
@ -136,16 +136,16 @@ function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): s
|
|||
const sections: string[] = []
|
||||
|
||||
if (testRuns.length > 1 || options.onlySummary) {
|
||||
const tableData = testRuns.map((tr, runIndex) => {
|
||||
const time = formatTime(tr.time)
|
||||
const name = tr.path
|
||||
const addr = options.baseUrl + makeRunSlug(runIndex).link
|
||||
const nameLink = link(name, addr)
|
||||
const passed = tr.passed > 0 ? `${tr.passed}${Icon.success}` : ''
|
||||
const failed = tr.failed > 0 ? `${tr.failed}${Icon.fail}` : ''
|
||||
const skipped = tr.skipped > 0 ? `${tr.skipped}${Icon.skip}` : ''
|
||||
return [nameLink, passed, failed, skipped, time]
|
||||
})
|
||||
const tableData = testRuns
|
||||
.filter(tr => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0)
|
||||
.map(tr => {
|
||||
const time = formatTime(tr.time)
|
||||
const name = tr.path
|
||||
const passed = tr.passed > 0 ? `${tr.passed}${Icon.success}` : ''
|
||||
const failed = tr.failed > 0 ? `${tr.failed}${Icon.fail}` : ''
|
||||
const skipped = tr.skipped > 0 ? `${tr.skipped}${Icon.skip}` : ''
|
||||
return [name, passed, failed, skipped, time]
|
||||
})
|
||||
|
||||
const resultsTable = table(
|
||||
['Report', 'Passed', 'Failed', 'Skipped', 'Time'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue