@testomatio/reporter 0.5.4 → 0.5.5

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,7 @@
1
+ # 0.5.5
2
+
3
+ * Fixed `BeforeSuite` failures in CodeceptJS
4
+
1
5
  # 0.5.4
2
6
 
3
7
  Added `TESTOMATIO_CREATE=1` option to create unmatched tests on report
@@ -114,6 +114,26 @@ function CodeceptReporter(config) {
114
114
  error = err;
115
115
  });
116
116
 
117
+ event.dispatcher.on(event.hook.failed, (suite, err) => {
118
+ const error = err;
119
+
120
+ if (!suite) return;
121
+ if (!suite.tests) return;
122
+ for (const test of suite.tests) {
123
+ const { id, tags, title } = test;
124
+ failedTests.push(id || title);
125
+ const testId = parseTest(tags);
126
+
127
+ client.addTestRun(testId, TRConstants.FAILED, {
128
+ ...stripExampleFromTitle(title),
129
+ suite_title: suite.title,
130
+ error,
131
+ time: 0,
132
+ });
133
+ }
134
+ output.stop();
135
+ });
136
+
117
137
  event.dispatcher.on(event.test.after, test => {
118
138
  if (test.state && test.state !== FAILED) return;
119
139
  if (test.err) error = test.err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "repository": "git@github.com:testomatio/reporter.git",