mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
exclude hidden "tests" from test result
This commit is contained in:
parent
a26c5eaf39
commit
cacdfc564b
1 changed files with 11 additions and 9 deletions
|
|
@ -123,7 +123,7 @@ export class DartJsonParser implements TestParser {
|
||||||
const group = suite.groups[evt.test.groupIDs[evt.test.groupIDs.length - 1]]
|
const group = suite.groups[evt.test.groupIDs[evt.test.groupIDs.length - 1]]
|
||||||
group.tests.push(test)
|
group.tests.push(test)
|
||||||
tests[evt.test.id] = test
|
tests[evt.test.id] = test
|
||||||
} else if (isTestDoneEvent(evt) && !evt.hidden && tests[evt.testID]) {
|
} else if (isTestDoneEvent(evt) && tests[evt.testID]) {
|
||||||
tests[evt.testID].testDone = evt
|
tests[evt.testID].testDone = evt
|
||||||
} else if (isErrorEvent(evt) && tests[evt.testID]) {
|
} else if (isErrorEvent(evt) && tests[evt.testID]) {
|
||||||
tests[evt.testID].error = evt
|
tests[evt.testID].error = evt
|
||||||
|
|
@ -152,14 +152,16 @@ export class DartJsonParser implements TestParser {
|
||||||
|
|
||||||
return groups.map(group => {
|
return groups.map(group => {
|
||||||
group.tests.sort((a, b) => (a.testStart.test.line ?? 0) - (b.testStart.test.line ?? 0))
|
group.tests.sort((a, b) => (a.testStart.test.line ?? 0) - (b.testStart.test.line ?? 0))
|
||||||
const tests = group.tests.map(tc => {
|
const tests = group.tests
|
||||||
const error = this.getError(suite, tc)
|
.filter(tc => !tc.testDone?.hidden)
|
||||||
const testName =
|
.map(tc => {
|
||||||
group.group.name !== undefined && tc.testStart.test.name.startsWith(group.group.name)
|
const error = this.getError(suite, tc)
|
||||||
? tc.testStart.test.name.slice(group.group.name.length).trim()
|
const testName =
|
||||||
: tc.testStart.test.name.trim()
|
group.group.name !== undefined && tc.testStart.test.name.startsWith(group.group.name)
|
||||||
return new TestCaseResult(testName, tc.result, tc.time, error)
|
? 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)
|
return new TestGroupResult(group.group.name, tests)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue