1
0
Fork 0
mirror of https://github.com/dorny/test-reporter.git synced 2026-03-22 07:52:14 +01:00

Refactor test-reporter to module based package

This commit is contained in:
Jozef Izso 2026-03-02 14:28:52 +01:00
parent 02510bde1f
commit ef1f9a4e60
Failed to extract signature
23 changed files with 90 additions and 89 deletions

View file

@ -1,6 +1,6 @@
import {ParseOptions, TestParser} from '../../test-parser'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils.js'
import {
ReportEvent,
@ -17,7 +17,7 @@ import {
isDoneEvent,
isMessageEvent,
MessageEvent
} from './dart-json-types'
} from './dart-json-types.js'
import {
TestExecutionResult,
@ -26,7 +26,7 @@ import {
TestGroupResult,
TestCaseResult,
TestCaseError
} from '../../test-results'
} from '../../test-results.js'
class TestRun {
constructor(

View file

@ -1,9 +1,9 @@
import {ParseOptions, TestParser} from '../../test-parser'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {parseStringPromise} from 'xml2js'
import {NunitReport, TestCase, TestSuite} from './dotnet-nunit-types'
import {getExceptionSource} from '../../utils/node-utils'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils'
import {NunitReport, TestCase, TestSuite} from './dotnet-nunit-types.js'
import {getExceptionSource} from '../../utils/node-utils.js'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils.js'
import {
TestExecutionResult,
@ -12,7 +12,7 @@ import {
TestGroupResult,
TestCaseResult,
TestCaseError
} from '../../test-results'
} from '../../test-results.js'
export class DotnetNunitParser implements TestParser {
assumedWorkDir: string | undefined

View file

@ -1,10 +1,10 @@
import {parseStringPromise} from 'xml2js'
import {ErrorInfo, Outcome, TrxReport, UnitTest, UnitTestResult} from './dotnet-trx-types'
import {ParseOptions, TestParser} from '../../test-parser'
import {ErrorInfo, Outcome, TrxReport, UnitTest, UnitTestResult} from './dotnet-trx-types.js'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils'
import {parseIsoDate, parseNetDuration} from '../../utils/parse-utils'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils.js'
import {parseIsoDate, parseNetDuration} from '../../utils/parse-utils.js'
import {
TestExecutionResult,
@ -13,7 +13,7 @@ import {
TestGroupResult,
TestCaseResult,
TestCaseError
} from '../../test-results'
} from '../../test-results.js'
class TestClass {
constructor(readonly name: string) {}

View file

@ -1,8 +1,8 @@
import { ParseOptions, TestParser } from '../../test-parser'
import { ParseOptions, TestParser } from '../../test-parser.js'
import { GoTestEvent } from './golang-json-types'
import { getExceptionSource } from '../../utils/node-utils'
import { getBasePath, normalizeFilePath } from '../../utils/path-utils'
import { GoTestEvent } from './golang-json-types.js'
import { getExceptionSource } from '../../utils/node-utils.js'
import { getBasePath, normalizeFilePath } from '../../utils/path-utils.js'
import {
TestExecutionResult,
@ -11,7 +11,7 @@ import {
TestGroupResult,
TestCaseResult,
TestCaseError
} from '../../test-results'
} from '../../test-results.js'
export class GolangJsonParser implements TestParser {
assumedWorkDir: string | undefined

View file

@ -1,10 +1,10 @@
import * as path from 'path'
import {ParseOptions, TestParser} from '../../test-parser'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {parseStringPromise} from 'xml2js'
import {JunitReport, SingleSuiteReport, TestCase, TestSuite} from './java-junit-types'
import {parseStackTraceElement} from './java-stack-trace-element-parser'
import {normalizeFilePath} from '../../utils/path-utils'
import {JunitReport, SingleSuiteReport, TestCase, TestSuite} from './java-junit-types.js'
import {parseStackTraceElement} from './java-stack-trace-element-parser.js'
import {normalizeFilePath} from '../../utils/path-utils.js'
import {
TestExecutionResult,
@ -13,7 +13,7 @@ import {
TestGroupResult,
TestCaseResult,
TestCaseError
} from '../../test-results'
} from '../../test-results.js'
export class JavaJunitParser implements TestParser {
readonly trackedFiles: {[fileName: string]: string[]}

View file

@ -1,9 +1,9 @@
import {ParseOptions, TestParser} from '../../test-parser'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {parseStringPromise} from 'xml2js'
import {JunitReport, TestCase, TestSuite} from './jest-junit-types'
import {getExceptionSource} from '../../utils/node-utils'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils'
import {JunitReport, TestCase, TestSuite} from './jest-junit-types.js'
import {getExceptionSource} from '../../utils/node-utils.js'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils.js'
import {
TestExecutionResult,
@ -12,7 +12,7 @@ import {
TestGroupResult,
TestCaseResult,
TestCaseError
} from '../../test-results'
} from '../../test-results.js'
export class JestJunitParser implements TestParser {
assumedWorkDir: string | undefined

View file

@ -1,4 +1,4 @@
import {ParseOptions, TestParser} from '../../test-parser'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {
TestCaseError,
TestCaseResult,
@ -6,10 +6,10 @@ import {
TestGroupResult,
TestRunResult,
TestSuiteResult
} from '../../test-results'
import {getExceptionSource} from '../../utils/node-utils'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils'
import {MochaJson, MochaJsonTest} from './mocha-json-types'
} from '../../test-results.js'
import {getExceptionSource} from '../../utils/node-utils.js'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils.js'
import {MochaJson, MochaJsonTest} from './mocha-json-types.js'
export class MochaJsonParser implements TestParser {
assumedWorkDir: string | undefined

View file

@ -1,8 +1,8 @@
import {ParseOptions, TestParser} from '../../test-parser'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {parseStringPromise} from 'xml2js'
import {PhpunitReport, SingleSuiteReport, TestCase, TestSuite} from './phpunit-junit-types'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils'
import {PhpunitReport, SingleSuiteReport, TestCase, TestSuite} from './phpunit-junit-types.js'
import {getBasePath, normalizeFilePath} from '../../utils/path-utils.js'
import {
TestExecutionResult,
@ -11,7 +11,7 @@ import {
TestGroupResult,
TestCaseResult,
TestCaseError
} from '../../test-results'
} from '../../test-results.js'
export class PhpunitJunitParser implements TestParser {
readonly trackedFiles: Set<string>

View file

@ -1,5 +1,5 @@
import {ParseOptions} from '../../test-parser'
import {JavaJunitParser} from '../java-junit/java-junit-parser'
import {ParseOptions} from '../../test-parser.js'
import {JavaJunitParser} from '../java-junit/java-junit-parser.js'
export class PythonXunitParser extends JavaJunitParser {
constructor(readonly options: ParseOptions) {

View file

@ -1,4 +1,4 @@
import {ParseOptions, TestParser} from '../../test-parser'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {
TestCaseError,
TestCaseResult,
@ -6,8 +6,8 @@ import {
TestGroupResult,
TestRunResult,
TestSuiteResult
} from '../../test-results'
import {RspecJson, RspecExample} from './rspec-json-types'
} from '../../test-results.js'
import {RspecJson, RspecExample} from './rspec-json-types.js'
export class RspecJsonParser implements TestParser {
assumedWorkDir: string | undefined

View file

@ -1,5 +1,5 @@
import {ParseOptions} from '../../test-parser'
import {JavaJunitParser} from '../java-junit/java-junit-parser'
import {ParseOptions} from '../../test-parser.js'
import {JavaJunitParser} from '../java-junit/java-junit-parser.js'
export class SwiftXunitParser extends JavaJunitParser {
constructor(readonly options: ParseOptions) {

View file

@ -1,9 +1,9 @@
import * as path from 'path'
import {ParseOptions, TestParser} from '../../test-parser'
import {ParseOptions, TestParser} from '../../test-parser.js'
import {parseStringPromise} from 'xml2js'
import {NetteTesterReport, SingleSuiteReport, TestCase, TestSuite} from './tester-junit-types'
import {normalizeFilePath} from '../../utils/path-utils'
import {NetteTesterReport, SingleSuiteReport, TestCase, TestSuite} from './tester-junit-types.js'
import {normalizeFilePath} from '../../utils/path-utils.js'
import {
TestExecutionResult,
@ -12,7 +12,7 @@ import {
TestGroupResult,
TestCaseResult,
TestCaseError
} from '../../test-results'
} from '../../test-results.js'
interface ParsedTestName {
filePath: string