mirror of
https://github.com/dorny/test-reporter.git
synced 2026-03-22 07:52:14 +01:00
NUnit Legacy: clean up suite/group names
This commit is contained in:
parent
0850bc862a
commit
e89b2f3e47
5 changed files with 34 additions and 34 deletions
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
|
@ -789,7 +789,7 @@ class DotnetNunitLegacyParser {
|
|||
// 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;
|
||||
|
|
@ -803,7 +803,7 @@ class DotnetNunitLegacyParser {
|
|||
existingGroup = new test_results_1.TestGroupResult(groupName, []);
|
||||
existingSuite.groups.push(existingGroup);
|
||||
}
|
||||
existingGroup.tests.push(new test_results_1.TestCaseResult(testCase.$.name, this.getTestExecutionResult(testCase), parseFloat(testCase.$.time), this.getTestCaseError(testCase)));
|
||||
existingGroup.tests.push(new test_results_1.TestCaseResult(testCase.$.name.startsWith(suiteName + '.') ? testCase.$.name.substring(suiteName.length + 1) : testCase.$.name, this.getTestExecutionResult(testCase), parseFloat(testCase.$.time), this.getTestCaseError(testCase)));
|
||||
}
|
||||
getTestExecutionResult(test) {
|
||||
if (test.$.result === 'Failed' || test.failure)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue