Skip to content

Commit

Permalink
Merge branch 'Bolodya1997-nested-suites'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jan 22, 2021
2 parents 3dd6bca + 5a2beac commit ceb4e35
Show file tree
Hide file tree
Showing 9 changed files with 9,817 additions and 593 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,7 @@ Thumbs.db

# Ignore built ts files
__tests__/runner/*
lib/**/*
lib/**/*

# Jetbrains files
.idea/
38 changes: 38 additions & 0 deletions __tests__/testParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,42 @@ action.surefire.report.email.InvalidEmailAddressException: Invalid email address
expect(fileName).toBe('EmailAddressTest++');
expect(line).toBe(39);
});

it('should parse correctly nested test suites', async () => {
const { count, skipped, annotations } = await parseFile('test_results/nested/junit.xml', 'Test*');

expect(count).toBe(5);
expect(skipped).toBe(0);
expect(annotations).toStrictEqual([{
"path": "A",
"start_line": 1,
"end_line": 1,
"start_column": 0,
"end_column": 0,
"annotation_level": "failure",
"title": "A.TestA/A",
"message": "failure",
"raw_details": ""
}, {
"path": "B",
"start_line": 1,
"end_line": 1,
"start_column": 0,
"end_column": 0,
"annotation_level": "failure",
"title": "B.TestB/B",
"message": "failure",
"raw_details": ""
}, {
"path": "A",
"start_line": 1,
"end_line": 1,
"start_column": 0,
"end_column": 0,
"annotation_level": "failure",
"title": "A.A",
"message": "failure",
"raw_details": ""
}]);
});
});
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
description: 'JUnit xml report paths in glob format'
required: false
default: '**/junit-reports/TEST-*.xml'
suite_regex:
description: 'Regular expression for the named test suites'
required: false
default: ''
check_name:
description: 'Check name for test reports.'
required: false
Expand Down
Loading

0 comments on commit ceb4e35

Please sign in to comment.