Update the validation

This commit is contained in:
luisito666 2022-10-18 10:59:27 -05:00
parent 39eab1c454
commit 8079cf8926
3 changed files with 3 additions and 3 deletions

2
dist/index.js generated vendored
View file

@ -945,7 +945,7 @@ class GoJunitParser {
getGroups(suite) {
const groups = [];
const returnEmpytGroups = [];
if (!suite.testcase)
if (suite.testcase.length === 0)
return returnEmpytGroups;
for (const tc of suite.testcase) {
let grp = groups.find(g => g.describe === tc.$.classname);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -50,7 +50,7 @@ export class GoJunitParser implements TestParser {
private getGroups(suite: TestSuite): TestGroupResult[] {
const groups: {describe: string; tests: TestCase[]}[] = []
const returnEmpytGroups: TestGroupResult[] = [];
if (!suite.testcase) return returnEmpytGroups;
if (suite.testcase.length === 0) return returnEmpytGroups;
for (const tc of suite.testcase) {
let grp = groups.find(g => g.describe === tc.$.classname)
if (grp === undefined) {