Skip to content

Commit

Permalink
fixing format
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Catania committed Sep 22, 2023
1 parent 76a051e commit ac305c1
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/test-results.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {DEFAULT_LOCALE} from './utils/node-utils'

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 {
return this.suites.reduce((sum, g) => sum + g.tests, 0)
Expand Down Expand Up @@ -40,7 +44,11 @@ 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
) {}

get tests(): number {
return this.groups.reduce((sum, g) => sum + g.tests.length, 0)
Expand Down Expand Up @@ -78,7 +86,10 @@ export class TestSuiteResult {
}

export class TestGroupResult {
constructor(readonly name: string | undefined | null, readonly tests: TestCaseResult[]) {}
constructor(
readonly name: string | undefined | null,
readonly tests: TestCaseResult[]
) {}

get passed(): number {
return this.tests.reduce((sum, t) => (t.result === 'success' ? sum + 1 : sum), 0)
Expand Down

0 comments on commit ac305c1

Please sign in to comment.