mirror of
https://github.com/block/buzz.git
synced 2026-11-08 10:21:46 +00:00
Signed-off-by: Taylor Ho <taylorkmho@gmail.com> Co-authored-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
31 lines
770 B
JavaScript
31 lines
770 B
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { fromRawPersona } from "./tauriPersonas.ts";
|
|
|
|
function rawPersona(overrides = {}) {
|
|
return {
|
|
id: "persona-1",
|
|
display_name: "Team Analyst",
|
|
avatar_url: null,
|
|
system_prompt: "You are Team Analyst.",
|
|
runtime: null,
|
|
model: null,
|
|
provider: null,
|
|
name_pool: [],
|
|
is_builtin: false,
|
|
is_active: true,
|
|
source_team: null,
|
|
env_vars: {},
|
|
created_at: "2026-01-01T00:00:00.000Z",
|
|
updated_at: "2026-01-01T00:00:00.000Z",
|
|
...overrides,
|
|
};
|
|
}
|
|
|
|
test("fromRawPersona maps source_team to sourceTeam", () => {
|
|
const persona = fromRawPersona(rawPersona({ source_team: "team-research" }));
|
|
|
|
assert.equal(persona.sourceTeam, "team-research");
|
|
});
|