mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +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
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
|
@ -498,7 +498,10 @@ class DartJsonParser {
|
|||
group.tests.sort((a, b) => { var _a, _b; return ((_a = a.testStart.test.line) !== null && _a !== void 0 ? _a : 0) - ((_b = b.testStart.test.line) !== null && _b !== void 0 ? _b : 0); });
|
||||
const tests = group.tests.map(tc => {
|
||||
const error = this.getError(suite, tc);
|
||||
return new test_results_1.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 test_results_1.TestCaseResult(testName, tc.result, tc.time, error);
|
||||
});
|
||||
return new test_results_1.TestGroupResult(group.group.name, tests);
|
||||
});
|
||||
|
|
|
|||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue