mirror of
https://github.com/block/buzz.git
synced 2026-11-01 23:11:58 +00:00
Add preferred runtime onboarding (#2040)
Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
@@ -120,6 +120,23 @@ test("row 3: plain avatar URLs pass through; base64 data URIs upload via the inj
|
||||
assert.equal(uploads.length, 1, "upload must go through the injected fn");
|
||||
});
|
||||
|
||||
test("row 3: failed persona avatar upload never substitutes the runtime avatar", async () => {
|
||||
const input = await buildInstanceInputForDefinition(
|
||||
persona({
|
||||
id: "builtin:fizz",
|
||||
displayName: "Fizz",
|
||||
avatarUrl: "data:image/png;base64,aGk=",
|
||||
}),
|
||||
claudeRuntime,
|
||||
async () => {
|
||||
throw new Error("upload failed");
|
||||
},
|
||||
);
|
||||
|
||||
assert.equal(input.avatarUrl, undefined);
|
||||
assert.notEqual(input.avatarUrl, claudeRuntime.avatarUrl);
|
||||
});
|
||||
|
||||
test("mapping carries the runtime and definition fields", async () => {
|
||||
const input = await buildInstanceInputForDefinition(persona(), gooseRuntime);
|
||||
assert.equal(input.name, "Test Agent");
|
||||
|
||||
Reference in New Issue
Block a user