froth-webdriverio-framework 7.0.40 → 7.0.41

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.
@@ -294,7 +294,9 @@ const commonHooks = {
294
294
  resultdetails.excution_time = await msToTime(totalTime);
295
295
 
296
296
  console.log("Exit code after session===>" + exitCode)
297
- exitCode = exitCode ?? 0;
297
+ if (exitCode === undefined || exitCode === null) {
298
+ exitCode = 1 // treat as failure
299
+ }
298
300
  resultdetails.excution_status = exitCode === 0 ? 'PASSED' : 'FAILED';
299
301
 
300
302
  console.log('Comments being sent:', resultdetails.comments);
@@ -328,7 +330,9 @@ const commonHooks = {
328
330
  onComplete: async (exitCode, _, __, results) => {
329
331
  console.log('==== ON COMPLETE ====');
330
332
  console.log(`Total: ${results.total || 0}, Passed: ${results.passed || 0}, Failed: ${results.failed || 0}`);
331
- exitCode = exitCode ?? 0;
333
+ if (exitCode === undefined || exitCode === null) {
334
+ exitCode = 1 // treat as failure
335
+ }
332
336
  resultdetails.excution_status = exitCode === 0 ? 'PASSED' : 'FAILED';
333
337
 
334
338
  await safeUpdateExecution();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "7.0.40",
3
+ "version": "7.0.41",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",