From 62b89ea98d6e40661162673630d2e234f7489245 Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Sat, 9 Dec 2023 21:17:07 +0100 Subject: [PATCH] Apply code style fix --- __tests__/swift-xunit.test.ts | 6 +----- dist/index.js | 22 ++++++++++++++++++++++ src/parsers/dart-json/dart-json-parser.ts | 12 ++++++++++-- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/__tests__/swift-xunit.test.ts b/__tests__/swift-xunit.test.ts index e0a2cd03..474c8681 100644 --- a/__tests__/swift-xunit.test.ts +++ b/__tests__/swift-xunit.test.ts @@ -13,11 +13,7 @@ describe('swift-xunit tests', () => { const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) - const trackedFiles = [ - 'Package.swift', - 'Sources/AcmeLib/AcmeLib.swift', - 'Tests/AcmeLibTests/AcmeLibTests.swift', - ] + const trackedFiles = ['Package.swift', 'Sources/AcmeLib/AcmeLib.swift', 'Tests/AcmeLibTests/AcmeLibTests.swift'] const opts: ParseOptions = { parseErrors: true, trackedFiles diff --git a/dist/index.js b/dist/index.js index 6246d8d8..f64acacd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -265,6 +265,7 @@ const dotnet_trx_parser_1 = __nccwpck_require__(2664); const java_junit_parser_1 = __nccwpck_require__(676); const jest_junit_parser_1 = __nccwpck_require__(1113); const mocha_json_parser_1 = __nccwpck_require__(6043); +const swift_xunit_parser_1 = __nccwpck_require__(5366); const path_utils_1 = __nccwpck_require__(4070); const github_utils_1 = __nccwpck_require__(3522); const markdown_utils_1 = __nccwpck_require__(6482); @@ -431,6 +432,8 @@ class TestReporter { return new jest_junit_parser_1.JestJunitParser(options); case 'mocha-json': return new mocha_json_parser_1.MochaJsonParser(options); + case 'swift-xunit': + return new swift_xunit_parser_1.SwiftXunitParser(options); default: throw new Error(`Input variable 'reporter' is set to invalid value '${reporter}'`); } @@ -1395,6 +1398,25 @@ class MochaJsonParser { exports.MochaJsonParser = MochaJsonParser; +/***/ }), + +/***/ 5366: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SwiftXunitParser = void 0; +const java_junit_parser_1 = __nccwpck_require__(676); +class SwiftXunitParser extends java_junit_parser_1.JavaJunitParser { + constructor(options) { + super(options); + this.options = options; + } +} +exports.SwiftXunitParser = SwiftXunitParser; + + /***/ }), /***/ 5867: diff --git a/src/parsers/dart-json/dart-json-parser.ts b/src/parsers/dart-json/dart-json-parser.ts index 9399dc3f..25a716b8 100644 --- a/src/parsers/dart-json/dart-json-parser.ts +++ b/src/parsers/dart-json/dart-json-parser.ts @@ -29,7 +29,12 @@ import { } from '../../test-results' class TestRun { - constructor(readonly path: string, readonly suites: TestSuite[], readonly success: boolean, readonly time: number) {} + constructor( + readonly path: string, + readonly suites: TestSuite[], + readonly success: boolean, + readonly time: number + ) {} } class TestSuite { @@ -74,7 +79,10 @@ class TestCase { export class DartJsonParser implements TestParser { assumedWorkDir: string | undefined - constructor(readonly options: ParseOptions, readonly sdk: 'dart' | 'flutter') {} + constructor( + readonly options: ParseOptions, + readonly sdk: 'dart' | 'flutter' + ) {} async parse(path: string, content: string): Promise { const tr = this.getTestRun(path, content)