mirror of
https://github.com/block/buzz.git
synced 2026-11-03 07:51:22 +00:00
test(sidebar): cover ownerless relay agents
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
committed by
npub14vtk7pvazqrq9639qu7e560wnqtl0d53ca4gjuvq6jzf3k2el23qqlwa7f
parent
07e14d25ad
commit
4535a42323
@@ -99,6 +99,28 @@ describe("getOwnedRelayWorkingAgents", () => {
|
||||
[],
|
||||
);
|
||||
});
|
||||
|
||||
it("drops relay agents with missing profiles or null owners", () => {
|
||||
assert.deepEqual(
|
||||
getOwnedRelayWorkingAgents(
|
||||
[
|
||||
{ pubkey: OWNED_RELAY_AGENT_PUBKEY, name: "nadia" },
|
||||
{ pubkey: "ownerless-agent", name: "ralph" },
|
||||
],
|
||||
{
|
||||
"ownerless-agent": {
|
||||
displayName: "ralph",
|
||||
avatarUrl: null,
|
||||
nip05Handle: null,
|
||||
ownerPubkey: null,
|
||||
isAgent: true,
|
||||
},
|
||||
},
|
||||
VIEWER_PUBKEY,
|
||||
),
|
||||
[],
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("mergeWorkingAgents", () => {
|
||||
|
||||
Reference in New Issue
Block a user