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 6b7a629031
commit 33aae4039b

View File

@@ -379,7 +379,13 @@ export class GoTestReporter implements Reporter {
} }
update(path: string[], result: TestResult) { 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() { finalize() {