Harness: print non-string check details as JSON
game-maker / suite (push) Successful in 7m50s

check() appended the detail by string concatenation, so an object
argument showed up as "[object Object]" in the log (27-console.mjs).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Fable 5.1 committed 2026-09-13 11:00:14 +02:00
1 parent db704105ed
commit b0c4b4ec5a
1 file changed
+2 -1
+2 -1
View File
@@ -382,7 +382,8 @@ export async function runChecks(options, body) {
let failures = 0;
let checkCount = 0;
function check(name, ok, detail = '') {
console.log(`${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ' – ' + detail : ''}`);
const text = typeof detail === 'string' ? detail : JSON.stringify(detail);
console.log(`${ok ? 'PASS' : 'FAIL'} ${name}${text ? ' – ' + text : ''}`);
checkCount++;
if (!ok) failures++;
}