1
0
forked from rosa/hakurei

cmd/pkgserver: serialize JS enums as ints instead of strings

This commit is contained in:
Kat
2026-03-22 06:08:00 +11:00
parent 90e7a63acc
commit 96acdd696c

View File

@@ -352,7 +352,13 @@ export class GoTestReporter implements Reporter {
}
update(path: string[], result: TestResult) {
console.log(JSON.stringify({ path: path, ...result }));
let state: number;
switch (result.state) {
case "success": state = 0; break;
case "failure": state = 1; break;
case "skip": state = 2; break;
}
console.log(JSON.stringify({ path: path, state, logs: result.logs }));
}
finalize() {