Apply code style fix

This commit is contained in:
Michal Dorner 2023-12-09 21:17:07 +01:00
parent be0e2e90e1
commit 62b89ea98d
No known key found for this signature in database
GPG key ID: 7325B8B59CA1B65C
3 changed files with 33 additions and 7 deletions

View file

@ -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

22
dist/index.js generated vendored
View file

@ -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:

View file

@ -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<TestRunResult> {
const tr = this.getTestRun(path, content)