mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-18 00:03:11 +00:00
test: pin the type tag on the bun wrapper that collects extra
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H9xMqWcQBvJwrvMb5Tw3nH
This commit is contained in:
co-authored by
Claude Opus 5
parent
d995522ddd
commit
a1d7c530bd
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user