From 550fd6f7244d1d17d561e5363ea24432d6133024 Mon Sep 17 00:00:00 2001 From: Kat <00-kat@proton.me> Date: Sun, 22 Mar 2026 06:08:00 +1100 Subject: [PATCH] cmd/pkgserver: serialize JS enums as ints instead of strings --- cmd/pkgserver/ui/static/test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/pkgserver/ui/static/test.ts b/cmd/pkgserver/ui/static/test.ts index 18424d23..c035647d 100644 --- a/cmd/pkgserver/ui/static/test.ts +++ b/cmd/pkgserver/ui/static/test.ts @@ -370,7 +370,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() {