1
0
Fork 0
mirror of https://github.com/dorny/test-reporter.git synced 2026-03-22 16:02:13 +01:00

NUnit Legacy: clean up suite/group names

This commit is contained in:
Shamus Taylor 2025-03-05 11:15:25 -06:00
parent 0850bc862a
commit e89b2f3e47
No known key found for this signature in database
GPG key ID: C44FC1AA547ACE39
5 changed files with 34 additions and 34 deletions

View file

@ -78,7 +78,7 @@ export class DotnetNunitLegacyParser implements TestParser {
// But ignore "Theory" suites.
const suitesWithoutTheories = suitePath.filter(suite => suite.$.type !== 'Theory')
const suiteName = suitesWithoutTheories
.slice(0, suitesWithoutTheories.length - 1)
.filter(suite => suite.$.type !== 'Assembly' && suite.$.type !== 'Project')
.map(suite => suite.$.name)
.join('.')
const groupName = suitesWithoutTheories[suitesWithoutTheories.length - 1].$.name
@ -97,7 +97,7 @@ export class DotnetNunitLegacyParser implements TestParser {
existingGroup.tests.push(
new TestCaseResult(
testCase.$.name,
testCase.$.name.startsWith(suiteName + '.') ? testCase.$.name.substring(suiteName.length + 1) : testCase.$.name,
this.getTestExecutionResult(testCase),
parseFloat(testCase.$.time),
this.getTestCaseError(testCase)