mocha-qase-reporter 1.0.0-beta.3 → 1.0.0-beta.4
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 +6 -0
- package/dist/reporter.js +4 -3
- package/package.json +1 -1
package/changelog.md
CHANGED
package/dist/reporter.js
CHANGED
|
@@ -36,7 +36,8 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
|
|
|
36
36
|
this.runner.on(Events.EVENT_TEST_BEGIN, (test) => this.addMethods(test.ctx));
|
|
37
37
|
this.runner.on(Events.EVENT_HOOK_BEGIN, (hook) => this.addMethods(hook.ctx));
|
|
38
38
|
this.runner.on(Events.EVENT_TEST_BEGIN, () => this.onStartTest());
|
|
39
|
-
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
40
|
+
this.runner.on(Events.EVENT_TEST_END, async (test) => await this.onEndTest(test));
|
|
40
41
|
};
|
|
41
42
|
this.qaseId = (id) => {
|
|
42
43
|
this.metadata.addQaseId(id);
|
|
@@ -146,7 +147,7 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
|
|
|
146
147
|
onStartTest() {
|
|
147
148
|
this.currentType = 'test';
|
|
148
149
|
}
|
|
149
|
-
onEndTest(test) {
|
|
150
|
+
async onEndTest(test) {
|
|
150
151
|
if (this.metadata.ignore) {
|
|
151
152
|
return;
|
|
152
153
|
}
|
|
@@ -197,7 +198,7 @@ class MochaQaseReporter extends mocha_1.reporters.Base {
|
|
|
197
198
|
testops_id: ids.length > 0 ? ids : null,
|
|
198
199
|
title: this.metadata.title && this.metadata.title != '' ? this.metadata.title : test.title,
|
|
199
200
|
};
|
|
200
|
-
|
|
201
|
+
await this.reporter.addTestResult(result);
|
|
201
202
|
this.metadata.clear();
|
|
202
203
|
this.currentTest = new currentTest();
|
|
203
204
|
}
|