Skip to content

Commit

Permalink
add stacktrace to output
Browse files Browse the repository at this point in the history
  • Loading branch information
Henner Kollmann authored and Henner Kollmann committed Jan 21, 2025
1 parent c15c752 commit 041271d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,11 @@ qx.Class.define("qxl.testtapper.compile.LibraryApi", {
}
let href = `http://localhost:${app.port}/${outputDir}${app.name}/`;
let url = new URL(href);
let s = "";
let s = "stackTrace=true";
if (app.argv.method) {
if (s.length > 0) {
s += "&";
}
s += "method=" + app.argv.method;
}
if (app.argv.class) {
Expand Down Expand Up @@ -269,7 +272,7 @@ qx.Class.define("qxl.testtapper.compile.LibraryApi", {
}
}
let res = await Promise.all(tests);
let sum = res.reduceRight((accumulator, currentValue) => accumulator + currentValue, 0);
let sum = res.reduceRight((accumulator, currentValue) => {return accumulator + currentValue;}, 0);
result.setExitCode(result.getExitCode() + sum);
},

Expand Down
3 changes: 3 additions & 0 deletions source/class/qxl/testtapper/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ qx.Class.define("qxl.testtapper.Application", {
if (item.exception) {
if (item.exception.message) {
let message = item.exception.toString();
if (cfg.stackTrace) {
message = `${item.exception.getComment()}\n${item.exception.stack}`;
}
this.info(
`not ok ${that._cnt} - ${test} - [${numberFormat.format(
timeDiff
Expand Down

0 comments on commit 041271d

Please sign in to comment.