From a1d7c530bde2ff4bf12ae7b3a4f931fb90f82893 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 1 Sep 2026 10:48:42 +0000 Subject: [PATCH] test: pin the type tag on the bun wrapper that collects extra Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01H9xMqWcQBvJwrvMb5Tw3nH --- backend/tests/bun_jobs.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/tests/bun_jobs.rs b/backend/tests/bun_jobs.rs index 3f78057f51..c2334bc739 100644 --- a/backend/tests/bun_jobs.rs +++ b/backend/tests/bun_jobs.rs @@ -458,7 +458,8 @@ export function main() { ); } - // An acyclic thrown object still reports its own properties, unchanged. + // An acyclic thrown object still reports its own properties, unchanged. Carrying + // `extra` does not stand in for identifying the throw, so the type tag reports it too. { let job = bun_job(r#"export function main() { throw { code: 42, hint: "kein Error" }; }"#); let completed = run_job_in_new_worker_until_complete(&db, false, job, port).await; @@ -468,6 +469,11 @@ export function main() { result["error"]["extra"], serde_json::json!({ "code": 42, "hint": "kein Error" }) ); + assert_eq!( + result["error"]["message"], + serde_json::json!("[object Object]") + ); + assert_eq!(result["error"]["name"], serde_json::json!("ThrownValue")); } Ok(())