mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-18 15:07:10 +01:00
lint: fix linting issues
This commit is contained in:
parent
58976f3a64
commit
24bbe17d84
2 changed files with 4 additions and 18 deletions
|
|
@ -4,10 +4,7 @@ import {FileContent, InputProvider, ReportInput} from './input-provider'
|
||||||
import {listFiles} from '../utils/git'
|
import {listFiles} from '../utils/git'
|
||||||
|
|
||||||
export class LocalFileProvider implements InputProvider {
|
export class LocalFileProvider implements InputProvider {
|
||||||
constructor(
|
constructor(readonly name: string, readonly pattern: string[]) {}
|
||||||
readonly name: string,
|
|
||||||
readonly pattern: string[]
|
|
||||||
) {}
|
|
||||||
|
|
||||||
async load(): Promise<ReportInput> {
|
async load(): Promise<ReportInput> {
|
||||||
const result: FileContent[] = []
|
const result: FileContent[] = []
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
import {DEFAULT_LOCALE} from './utils/node-utils'
|
import {DEFAULT_LOCALE} from './utils/node-utils'
|
||||||
|
|
||||||
export class TestRunResult {
|
export class TestRunResult {
|
||||||
constructor(
|
constructor(readonly path: string, readonly suites: TestSuiteResult[], private totalTime?: number) {}
|
||||||
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)
|
||||||
|
|
@ -44,11 +40,7 @@ export class TestRunResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TestSuiteResult {
|
export class TestSuiteResult {
|
||||||
constructor(
|
constructor(readonly name: string, readonly groups: TestGroupResult[], private totalTime?: number) {}
|
||||||
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)
|
||||||
|
|
@ -86,10 +78,7 @@ export class TestSuiteResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TestGroupResult {
|
export class TestGroupResult {
|
||||||
constructor(
|
constructor(readonly name: string | undefined | null, readonly tests: TestCaseResult[]) {}
|
||||||
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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue