build-raptor-jest-reporter 0.136.0 → 0.138.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.
Files changed (2) hide show
  1. package/index.js +33 -42
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __getOwnPropNames = Object.getOwnPropertyNames;
3
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4
3
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
4
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
@@ -7,47 +6,39 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
6
  if (typeof require !== "undefined") return require.apply(this, arguments);
8
7
  throw Error('Dynamic require of "' + x + '" is not supported');
9
8
  });
10
- var __commonJS = (cb, mod) => function __require2() {
11
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
- };
13
9
 
14
10
  // modules/build-raptor-jest-reporter/dist/src/index.js
15
- var require_index = __commonJS({
16
- "modules/build-raptor-jest-reporter/dist/src/index.js"(exports, module) {
17
- var path = __require("path");
18
- var fs = __require("fs");
19
- module.exports = class BuildRaptorJestReporter {
20
- static {
21
- __name(this, "BuildRaptorJestReporter");
22
- }
23
- constructor(config) {
24
- if (!config.outputFile) {
25
- throw new Error(`outputFile is missing (must be specified in the config)`);
26
- }
27
- this.file = path.isAbsolute(config.outputFile) ? config.outputFile : path.join(config.rootDir, config.outputFile);
28
- this.cases = [];
29
- }
30
- getLastError() {
31
- }
32
- onRunStart() {
33
- }
34
- onTestCaseResult(test, testCaseResult) {
35
- this.cases.push({ testFile: test.path, testCaseResult });
36
- }
37
- onRunComplete() {
38
- const cases = this.cases.map((at) => ({
39
- testCaseFullName: at.testCaseResult.fullName,
40
- fileName: at.testFile,
41
- ancestorTitles: at.testCaseResult.ancestorTitles,
42
- title: at.testCaseResult.title,
43
- status: at.testCaseResult.status,
44
- duration: at.testCaseResult.duration ?? void 0,
45
- message: at.testCaseResult.failureMessages?.join("\n")
46
- }));
47
- const output = { cases };
48
- fs.writeFileSync(this.file, JSON.stringify(output));
49
- }
50
- };
11
+ var path = __require("path");
12
+ var fs = __require("fs");
13
+ module.exports = class BuildRaptorJestReporter {
14
+ static {
15
+ __name(this, "BuildRaptorJestReporter");
51
16
  }
52
- });
53
- export default require_index();
17
+ constructor(config) {
18
+ if (!config.outputFile) {
19
+ throw new Error(`outputFile is missing (must be specified in the config)`);
20
+ }
21
+ this.file = path.isAbsolute(config.outputFile) ? config.outputFile : path.join(config.rootDir, config.outputFile);
22
+ this.cases = [];
23
+ }
24
+ getLastError() {
25
+ }
26
+ onRunStart() {
27
+ }
28
+ onTestCaseResult(test, testCaseResult) {
29
+ this.cases.push({ testFile: test.path, testCaseResult });
30
+ }
31
+ onRunComplete() {
32
+ const cases = this.cases.map((at) => ({
33
+ testCaseFullName: at.testCaseResult.fullName,
34
+ fileName: at.testFile,
35
+ ancestorTitles: at.testCaseResult.ancestorTitles,
36
+ title: at.testCaseResult.title,
37
+ status: at.testCaseResult.status,
38
+ duration: at.testCaseResult.duration ?? void 0,
39
+ message: at.testCaseResult.failureMessages?.join("\n")
40
+ }));
41
+ const output = { cases };
42
+ fs.writeFileSync(this.file, JSON.stringify(output));
43
+ }
44
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-raptor-jest-reporter",
3
- "version": "0.136.0",
3
+ "version": "0.138.0",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",