mirror of
https://github.com/dorny/test-reporter.git
synced 2026-03-21 23:52:12 +01:00
Rebuild the dist/index.js file
This commit is contained in:
parent
69312b98d1
commit
deb1d0223f
1 changed files with 14 additions and 13 deletions
27
dist/index.js
generated
vendored
27
dist/index.js
generated
vendored
|
|
@ -56676,7 +56676,8 @@ class DotnetTrxParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getTestClasses(trx) {
|
getTestClasses(trx) {
|
||||||
if (trx.TestRun.TestDefinitions === undefined || trx.TestRun.Results === undefined ||
|
if (trx.TestRun.TestDefinitions === undefined ||
|
||||||
|
trx.TestRun.Results === undefined ||
|
||||||
!trx.TestRun.TestDefinitions.some(td => td.UnitTest && Array.isArray(td.UnitTest))) {
|
!trx.TestRun.TestDefinitions.some(td => td.UnitTest && Array.isArray(td.UnitTest))) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
@ -56692,7 +56693,7 @@ class DotnetTrxParser {
|
||||||
}));
|
}));
|
||||||
const testClasses = {};
|
const testClasses = {};
|
||||||
for (const r of unitTestsResults) {
|
for (const r of unitTestsResults) {
|
||||||
const className = r.test.TestMethod[0].$.className ?? "Unclassified";
|
const className = r.test.TestMethod[0].$.className ?? 'Unclassified';
|
||||||
let tc = testClasses[className];
|
let tc = testClasses[className];
|
||||||
if (tc === undefined) {
|
if (tc === undefined) {
|
||||||
tc = new TestClass(className);
|
tc = new TestClass(className);
|
||||||
|
|
@ -56799,7 +56800,10 @@ class GolangJsonParser {
|
||||||
return this.getTestRunResult(path, events);
|
return this.getTestRunResult(path, events);
|
||||||
}
|
}
|
||||||
async getGolangTestEvents(path, content) {
|
async getGolangTestEvents(path, content) {
|
||||||
return content.trim().split('\n').map((line, index) => {
|
return content
|
||||||
|
.trim()
|
||||||
|
.split('\n')
|
||||||
|
.map((line, index) => {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(line);
|
return JSON.parse(line);
|
||||||
}
|
}
|
||||||
|
|
@ -56833,9 +56837,8 @@ class GolangJsonParser {
|
||||||
if (!event.Test) {
|
if (!event.Test) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let groupName;
|
const [first, ...rest] = event.Test.split('/');
|
||||||
let rest;
|
let groupName = first;
|
||||||
[groupName, ...rest] = event.Test.split('/');
|
|
||||||
let testName = rest.join('/');
|
let testName = rest.join('/');
|
||||||
if (!testName) {
|
if (!testName) {
|
||||||
testName = groupName;
|
testName = groupName;
|
||||||
|
|
@ -56847,9 +56850,7 @@ class GolangJsonParser {
|
||||||
suite.groups.push(group);
|
suite.groups.push(group);
|
||||||
}
|
}
|
||||||
const lastEvent = eventGroup.at(-1);
|
const lastEvent = eventGroup.at(-1);
|
||||||
const result = lastEvent.Action === 'pass' ? 'success'
|
const result = lastEvent.Action === 'pass' ? 'success' : lastEvent.Action === 'skip' ? 'skipped' : 'failed';
|
||||||
: lastEvent.Action === 'skip' ? 'skipped'
|
|
||||||
: 'failed';
|
|
||||||
if (lastEvent.Elapsed === undefined) {
|
if (lastEvent.Elapsed === undefined) {
|
||||||
throw new Error('missing elapsed on final test event');
|
throw new Error('missing elapsed on final test event');
|
||||||
}
|
}
|
||||||
|
|
@ -56860,14 +56861,14 @@ class GolangJsonParser {
|
||||||
.filter(e => e.Action === 'output')
|
.filter(e => e.Action === 'output')
|
||||||
.map(e => e.Output ?? '')
|
.map(e => e.Output ?? '')
|
||||||
// Go output prepends indentation to help group tests - remove it
|
// Go output prepends indentation to help group tests - remove it
|
||||||
.map(o => o.replace(/^ /, ''));
|
.map(o => o.replace(/^ {4}/, ''));
|
||||||
// First and last lines will be generic "test started" and "test finished" lines - remove them
|
// First and last lines will be generic "test started" and "test finished" lines - remove them
|
||||||
outputEvents.splice(0, 1);
|
outputEvents.splice(0, 1);
|
||||||
outputEvents.splice(-1, 1);
|
outputEvents.splice(-1, 1);
|
||||||
const details = outputEvents.join('');
|
const details = outputEvents.join('');
|
||||||
error = {
|
error = {
|
||||||
message: details,
|
message: details,
|
||||||
details: details
|
details
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
group.tests.push(new TestCaseResult(testName, result, time, error));
|
group.tests.push(new TestCaseResult(testName, result, time, error));
|
||||||
|
|
@ -57402,7 +57403,7 @@ class PhpunitJunitParser {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const failure = failures[0];
|
const failure = failures[0];
|
||||||
const details = typeof failure === 'string' ? failure : failure._ ?? '';
|
const details = typeof failure === 'string' ? failure : (failure._ ?? '');
|
||||||
// PHPUnit provides file path directly in testcase attributes
|
// PHPUnit provides file path directly in testcase attributes
|
||||||
let filePath;
|
let filePath;
|
||||||
let line;
|
let line;
|
||||||
|
|
@ -57790,7 +57791,7 @@ class NetteTesterJunitParser {
|
||||||
}
|
}
|
||||||
const failure = failures[0];
|
const failure = failures[0];
|
||||||
// For Nette Tester, details are in the message attribute, not as inner text
|
// For Nette Tester, details are in the message attribute, not as inner text
|
||||||
const details = typeof failure === 'string' ? failure : failure._ ?? failure.$?.message ?? '';
|
const details = typeof failure === 'string' ? failure : (failure._ ?? failure.$?.message ?? '');
|
||||||
// Try to extract file path and line from error details
|
// Try to extract file path and line from error details
|
||||||
let errorFilePath;
|
let errorFilePath;
|
||||||
let line;
|
let line;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue