@flakiness/junit-xml 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/parser.js +7 -4
- package/package.json +1 -1
- package/types/src/parser.d.ts.map +1 -1
package/lib/parser.js
CHANGED
|
@@ -107,14 +107,17 @@ async function traverseJUnitReport(context, node) {
|
|
|
107
107
|
const file = element.attributes["file"];
|
|
108
108
|
const line = parseInt(element.attributes["line"], 10);
|
|
109
109
|
const name = element.attributes["name"];
|
|
110
|
+
const isTopSuiteAFileSuite = !currentSuite && !!name && name === file;
|
|
111
|
+
const isFileSuite = isTopSuiteAFileSuite || !name && file;
|
|
112
|
+
const filePath = file ? toGitFilePath(file) : void 0;
|
|
110
113
|
const newSuite = {
|
|
111
|
-
title:
|
|
112
|
-
location:
|
|
113
|
-
file:
|
|
114
|
+
title: isFileSuite && filePath ? filePath : name,
|
|
115
|
+
location: filePath && !isNaN(line) ? {
|
|
116
|
+
file: filePath,
|
|
114
117
|
line,
|
|
115
118
|
column: 1
|
|
116
119
|
} : void 0,
|
|
117
|
-
type:
|
|
120
|
+
type: isFileSuite ? "file" : name ? "suite" : "anonymous suite",
|
|
118
121
|
suites: [],
|
|
119
122
|
tests: []
|
|
120
123
|
};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/parser.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/parser.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA6Q7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IACxD,UAAU,EAAE,EAAE,CAAC,WAAW,CAAC;IAC3B,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC;IACtB,WAAW,EAAE,EAAE,CAAC,UAAU,CAAC;IAC3B,iBAAiB,EAAE,EAAE,CAAC,eAAe,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;IAAC,WAAW,EAAE,WAAW,CAAC,UAAU,EAAE,CAAA;CAAE,CAAC,CAgCxE"}
|