trim names

This commit is contained in:
Aart Jan Kaptijn 2021-11-23 17:46:26 +01:00 committed by A. J. Kaptijn
parent 3db4c0f8a2
commit 9b92097e9f

View file

@ -187,7 +187,7 @@ function getSuitesReport(tr: TestRunResult, runIndex: number, options: ReportOpt
[Align.Left, Align.Right, Align.Right, Align.Right, Align.Right], [Align.Left, Align.Right, Align.Right, Align.Right, Align.Right],
...suites.map((s, suiteIndex) => { ...suites.map((s, suiteIndex) => {
const tsTime = formatTime(s.time) const tsTime = formatTime(s.time)
const tsName = s.name const tsName = s.name.startsWith(name) ? s.name.slice(name.length) : s.name
const skipLink = options.listTests === 'none' || (options.listTests === 'failed' && s.result !== 'failed') const skipLink = options.listTests === 'none' || (options.listTests === 'failed' && s.result !== 'failed')
const tsAddr = options.baseUrl + makeSuiteSlug(runIndex, suiteIndex).link const tsAddr = options.baseUrl + makeSuiteSlug(runIndex, suiteIndex).link
const tsNameLink = skipLink ? tsName : link(tsName, tsAddr) const tsNameLink = skipLink ? tsName : link(tsName, tsAddr)