dart-json: remove group name from test case names

This commit is contained in:
Michal Dorner 2021-03-15 10:48:37 +01:00
parent 40df4133f9
commit d5e42b8d57
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
6 changed files with 400 additions and 393 deletions

5
dist/index.js generated vendored
View file

@ -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

File diff suppressed because one or more lines are too long