From 2a7d917c0600a148cb75e6b650a351938e85eaa9 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 afbaff2e..794c4845 100644 --- a/cmd/pkgserver/ui/static/test.ts +++ b/cmd/pkgserver/ui/static/test.ts @@ -371,7 +371,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() {