From 11c8e6513a89ab26a278c540a989dd1bb7cdc873 Mon Sep 17 00:00:00 2001 From: Raul Sanchez-Mateos Date: Thu, 26 Jun 2025 09:16:08 +0200 Subject: [PATCH] (tmp) Add debugging traces Signed-off-by: Raul Sanchez-Mateos --- dist/index.js | 37 ++++++++++++++++--------------------- src/report/get-report.ts | 7 +++---- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/dist/index.js b/dist/index.js index b7ca089..0208a78 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2110,21 +2110,16 @@ function getTestsReport(ts, runIndex, suiteIndex, options) { sections.push(`### ${icon}\xa0${tsNameLink}`); sections.push('```'); for (const grp of groups) { - if (grp.name) { - sections.push(grp.name); - } - const space = grp.name ? ' ' : ''; for (const tc of grp.tests) { if (options.listTests === 'failed' && tc.result !== 'failed') { continue; } const result = getResultIcon(tc.result); - sections.push(`${space}${result} ${tc.name}`); + sections.push(`${result} ${tc.name}`); if (tc.error) { - const lines = (tc.error.message ?? (0, parse_utils_1.getFirstNonEmptyLine)(tc.error.details)?.trim()) - ?.split(/\r?\n/g) - .map(l => '\t' + l); - if (lines) { + const message = tc.error.message ?? (0, parse_utils_1.getFirstNonEmptyLine)(tc.error.details)?.trim(); + if (message) { + const lines = message.split(/\r?\n/g).map(l => '\t' + l); sections.push(...lines); } } @@ -3264,8 +3259,8 @@ class OidcClient { const res = yield httpclient .getJson(id_token_url) .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n Error Message: ${error.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; @@ -21781,7 +21776,7 @@ const understoodStatuses = new Set([ const errorStatusCodes = new Set([ 500, 502, - 503, + 503, 504, ]); @@ -24234,7 +24229,7 @@ exports.parse = function (s) { if(/^:base64:/.test(value)) return Buffer.from(value.substring(8), 'base64') else - return /^:/.test(value) ? value.substring(1) : value + return /^:/.test(value) ? value.substring(1) : value } return value }) @@ -61556,7 +61551,7 @@ module.exports = parseParams /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -61570,7 +61565,7 @@ module.exports = parseParams /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -61579,23 +61574,23 @@ module.exports = parseParams /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; -/******/ +/******/ /************************************************************************/ -/******/ +/******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined /******/ var __webpack_exports__ = __nccwpck_require__(5915); /******/ module.exports = __webpack_exports__; -/******/ +/******/ /******/ })() ; \ No newline at end of file diff --git a/src/report/get-report.ts b/src/report/get-report.ts index 8b649e4..3a43545 100644 --- a/src/report/get-report.ts +++ b/src/report/get-report.ts @@ -265,10 +265,9 @@ function getTestsReport(ts: TestSuiteResult, runIndex: number, suiteIndex: numbe const result = getResultIcon(tc.result) sections.push(`${result} ${tc.name}`) if (tc.error) { - const lines = (tc.error.message ?? getFirstNonEmptyLine(tc.error.details)?.trim()) - ?.split(/\r?\n/g) - .map(l => '\t' + l) - if (lines) { + const message = tc.error.message ?? getFirstNonEmptyLine(tc.error.details)?.trim(); + if (message) { + const lines = message.split(/\r?\n/g).map(l => '\t' + l); sections.push(...lines) } }