@reporters/junit 1.5.0 → 2.0.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/index.js +4 -6
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const util = require('node:util');
|
|
4
|
-
const { hostname } = require('node:os');
|
|
1
|
+
import util from 'node:util';
|
|
2
|
+
import { hostname } from 'node:os';
|
|
5
3
|
|
|
6
4
|
const HOSTNAME = hostname();
|
|
7
5
|
|
|
@@ -39,7 +37,7 @@ function isSkipped(node) {
|
|
|
39
37
|
return node?.children.some((c) => c.tag === 'skipped') || node?.props?.skipped;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
export default async function* junitReporter(source) {
|
|
43
41
|
yield '<?xml version="1.0" encoding="utf-8"?>\n';
|
|
44
42
|
yield '<testsuites>\n';
|
|
45
43
|
let currentSuite = null;
|
|
@@ -123,4 +121,4 @@ module.exports = async function* junitReporter(source) {
|
|
|
123
121
|
yield treeToXML(suite);
|
|
124
122
|
}
|
|
125
123
|
yield '</testsuites>\n';
|
|
126
|
-
}
|
|
124
|
+
}
|