Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 455bfeb

Browse filesBrowse files
Han5991aduh95
authored andcommitted
test_runner: add junit file attribute support
Add file attribute to JUnit testcase elements when file information is available in test event data. PR-URL: #59432 Fixes: #59422 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
1 parent 3d784dd commit 455bfeb
Copy full SHA for 455bfeb

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Filter options
  • lib/internal/test_runner/reporter
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Collapse file

‎lib/internal/test_runner/reporter/junit.js‎

Copy file name to clipboardExpand all lines: lib/internal/test_runner/reporter/junit.js
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ module.exports = async function* junitReporter(source) {
116116
} else {
117117
currentTest.tag = 'testcase';
118118
currentTest.attrs.classname = event.data.classname ?? 'test';
119+
if (event.data.file) {
120+
currentTest.attrs.file = event.data.file;
121+
}
119122
if (event.data.skip) {
120123
ArrayPrototypePush(currentTest.children, {
121124
__proto__: null, nesting: event.data.nesting + 1, tag: 'skipped',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.