@testrevolution/bugbug-cli 12.23.5 → 12.34.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@testrevolution/bugbug-cli",
3
3
  "description": "BugBug CLI",
4
- "version": "12.23.5",
4
+ "version": "12.34.1",
5
5
  "keywords": [
6
6
  "automation",
7
7
  "cli",
@@ -7,10 +7,16 @@ const { getSecondsFromDuration } = require('./helper');
7
7
 
8
8
  const getTestInJunitFormat = (testRun) => {
9
9
  const errorCode = testRun.errorCode ?? 'MISSING_ERROR_CODE';
10
- const errorDetails = {
11
- message: `Error ${errorCode} occurred in step: ${testRun.details[0].step.type} (${testRun.details[0].step.id})`,
12
- stack: errorCode,
13
- };
10
+ const stepInfo = testRun.details?.[0]?.step;
11
+ const errorDetails = stepInfo
12
+ ? {
13
+ message: `Error ${errorCode} occurred in step: ${stepInfo.type} (${stepInfo.id})`,
14
+ stack: errorCode,
15
+ }
16
+ : {
17
+ message: `Error ${errorCode} occurred`,
18
+ stack: errorCode,
19
+ };
14
20
  const errorsList = errorDetails ? [errorDetails] : [];
15
21
 
16
22
  return {