mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 14:57:09 +01:00
Added support for dotnet nunit
This commit is contained in:
parent
c9b3d0e2bd
commit
a97564ca53
21 changed files with 3265 additions and 1615 deletions
|
|
@ -40,7 +40,12 @@ export class TestRunResult {
|
|||
}
|
||||
|
||||
export class TestSuiteResult {
|
||||
constructor(readonly name: string, readonly groups: TestGroupResult[], private totalTime?: number) {}
|
||||
constructor(
|
||||
readonly name: string,
|
||||
readonly groups: TestGroupResult[],
|
||||
private totalTime?: number,
|
||||
private indentationDepth: number = 0
|
||||
) {}
|
||||
|
||||
get tests(): number {
|
||||
return this.groups.reduce((sum, g) => sum + g.tests.length, 0)
|
||||
|
|
@ -49,12 +54,15 @@ export class TestSuiteResult {
|
|||
get passed(): number {
|
||||
return this.groups.reduce((sum, g) => sum + g.passed, 0)
|
||||
}
|
||||
|
||||
get failed(): number {
|
||||
return this.groups.reduce((sum, g) => sum + g.failed, 0)
|
||||
}
|
||||
|
||||
get skipped(): number {
|
||||
return this.groups.reduce((sum, g) => sum + g.skipped, 0)
|
||||
}
|
||||
|
||||
get time(): number {
|
||||
return this.totalTime ?? this.groups.reduce((sum, g) => sum + g.time, 0)
|
||||
}
|
||||
|
|
@ -67,6 +75,10 @@ export class TestSuiteResult {
|
|||
return this.groups.filter(grp => grp.result === 'failed')
|
||||
}
|
||||
|
||||
get depth(): number {
|
||||
return this.indentationDepth
|
||||
}
|
||||
|
||||
sort(deep: boolean): void {
|
||||
this.groups.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '', DEFAULT_LOCALE))
|
||||
if (deep) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue