mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
dart-json: remove group name from test case names
This commit is contained in:
parent
40df4133f9
commit
d5e42b8d57
6 changed files with 400 additions and 393 deletions
|
|
@ -145,7 +145,11 @@ export class DartJsonParser implements TestParser {
|
|||
group.tests.sort((a, b) => (a.testStart.test.line ?? 0) - (b.testStart.test.line ?? 0))
|
||||
const tests = group.tests.map(tc => {
|
||||
const error = this.getError(suite, tc)
|
||||
return new TestCaseResult(tc.testStart.test.name, tc.result, tc.time, error)
|
||||
const testName =
|
||||
group.group.name !== undefined && tc.testStart.test.name.startsWith(group.group.name)
|
||||
? tc.testStart.test.name.slice(group.group.name.length).trim()
|
||||
: tc.testStart.test.name.trim()
|
||||
return new TestCaseResult(testName, tc.result, tc.time, error)
|
||||
})
|
||||
return new TestGroupResult(group.group.name, tests)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue