Skip to content

Commit

Permalink
Fix: make results logger errors manageable.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Jul 8, 2024
1 parent a359a5a commit 3c015b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/src/tester/ResultLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ export class ConsoleResultLogger implements ResultLogger {

#log_evaluation (evaluation: Evaluation, title: string, prefix: number = 0): void {
const result = ansi.padding(this.#result(evaluation.result), 0, prefix)
const message = evaluation.message != null ? `${ansi.gray('(' + evaluation.message + ')')}` : ''
var message = evaluation.message
if (message !== undefined && message?.length > 128 && !this._verbose) message = message.split(',')[0] + ', ...'
if (message !== undefined) message = ansi.gray(`${message}`)
console.log(`${result} ${title} ${message}`)
}

Expand Down

0 comments on commit 3c015b6

Please sign in to comment.