mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08:00
fixing format
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
import {DEFAULT_LOCALE} from './utils/node-utils'
|
import {DEFAULT_LOCALE} from './utils/node-utils'
|
||||||
|
|
||||||
export class TestRunResult {
|
export class TestRunResult {
|
||||||
constructor(readonly path: string, readonly suites: TestSuiteResult[], private totalTime?: number) {}
|
constructor(
|
||||||
|
readonly path: string,
|
||||||
|
readonly suites: TestSuiteResult[],
|
||||||
|
private totalTime?: number
|
||||||
|
) {}
|
||||||
|
|
||||||
get tests(): number {
|
get tests(): number {
|
||||||
return this.suites.reduce((sum, g) => sum + g.tests, 0)
|
return this.suites.reduce((sum, g) => sum + g.tests, 0)
|
||||||
@@ -40,7 +44,11 @@ export class TestRunResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class TestSuiteResult {
|
export class TestSuiteResult {
|
||||||
constructor(readonly name: string, readonly groups: TestGroupResult[], private totalTime?: number) {}
|
constructor(
|
||||||
|
readonly name: string,
|
||||||
|
readonly groups: TestGroupResult[],
|
||||||
|
private totalTime?: number
|
||||||
|
) {}
|
||||||
|
|
||||||
get tests(): number {
|
get tests(): number {
|
||||||
return this.groups.reduce((sum, g) => sum + g.tests.length, 0)
|
return this.groups.reduce((sum, g) => sum + g.tests.length, 0)
|
||||||
@@ -78,7 +86,10 @@ export class TestSuiteResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class TestGroupResult {
|
export class TestGroupResult {
|
||||||
constructor(readonly name: string | undefined | null, readonly tests: TestCaseResult[]) {}
|
constructor(
|
||||||
|
readonly name: string | undefined | null,
|
||||||
|
readonly tests: TestCaseResult[]
|
||||||
|
) {}
|
||||||
|
|
||||||
get passed(): number {
|
get passed(): number {
|
||||||
return this.tests.reduce((sum, t) => (t.result === 'success' ? sum + 1 : sum), 0)
|
return this.tests.reduce((sum, t) => (t.result === 'success' ? sum + 1 : sum), 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user