mocha-qase-reporter 1.0.2 → 1.1.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/changelog.md CHANGED
@@ -1,3 +1,11 @@
1
+ # qase-mocha@1.1.0
2
+
3
+ ## What's new
4
+
5
+ - Updated to the latest minor version of the common package for improved compatibility and features.
6
+ - Fixed all ESLint warnings across the project to ensure code quality and maintainability.
7
+ - Resolved an issue that prevented proper execution of async tests
8
+
1
9
  # qase-mocha@1.0.2
2
10
 
3
11
  ## What's new
@@ -8,6 +8,7 @@ class StreamInterceptor extends stream_1.Writable {
8
8
  super();
9
9
  this.onWrite = onWriteCallback;
10
10
  }
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
12
  _write(chunk, _encoding, callback) {
12
13
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-call
13
14
  this.onWrite(chunk.toString());
package/dist/parallel.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7
- // @ts-ignore
7
+ // @ts-expect-error
8
8
  const parallel_buffered_js_1 = __importDefault(require("mocha/lib/nodejs/reporters/parallel-buffered.js"));
9
9
  const reporter_js_1 = require("./reporter.js");
10
10
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
package/dist/reporter.js CHANGED
@@ -74,7 +74,7 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
74
74
  this.runner.on(Events.EVENT_TEST_END, (test) => this.onEndTest(test));
75
75
  };
76
76
  onStartRun() {
77
- this.reporter.startTestRun();
77
+ (0, deasync_promise_1.default)(this.reporter.startTestRunAsync());
78
78
  }
79
79
  onEndRun() {
80
80
  (0, deasync_promise_1.default)(this.reporter.publish());
@@ -105,10 +105,10 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
105
105
  this.testOutputs.set(test.title, output);
106
106
  });
107
107
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
108
- // @ts-ignore
108
+ // @ts-expect-error
109
109
  process.stdout.write = stdoutInterceptor.write.bind(stdoutInterceptor);
110
110
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
111
- // @ts-ignore
111
+ // @ts-expect-error
112
112
  process.stderr.write = stderrInterceptor.write.bind(stderrInterceptor);
113
113
  this.testOutputs.set(test.title, { stdout: '', stderr: '' });
114
114
  this.addMethodsToContext(test.ctx);
@@ -186,7 +186,7 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
186
186
  testops_id: ids.length > 0 ? ids : null,
187
187
  title: this.metadata.title && this.metadata.title != '' ? this.metadata.title : this.removeQaseIdsFromTitle(test.title),
188
188
  };
189
- (0, deasync_promise_1.default)(this.reporter.addTestResult(result));
189
+ void this.reporter.addTestResult(result);
190
190
  this.metadata.clear();
191
191
  this.currentTest = new currentTest();
192
192
  }
@@ -200,7 +200,7 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
200
200
  const file = test.parent ? this.getFile(test.parent) : undefined;
201
201
  if (file) {
202
202
  const executionPath = process.cwd() + '/';
203
- const path = file.replace(executionPath, '') ?? '';
203
+ const path = file.replace(executionPath, '');
204
204
  signature = path.split('/').join('::');
205
205
  }
206
206
  if (test.parent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocha-qase-reporter",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Mocha Cypress Reporter",
5
5
  "homepage": "https://github.com/qase-tms/qase-javascript",
6
6
  "sideEffects": false,
@@ -43,7 +43,7 @@
43
43
  "dependencies": {
44
44
  "mocha": "^10.2.0",
45
45
  "deasync-promise": "^1.0.1",
46
- "qase-javascript-commons": "~2.2.14",
46
+ "qase-javascript-commons": "~2.3.0",
47
47
  "uuid": "^9.0.1"
48
48
  },
49
49
  "devDependencies": {