test: clarify channel config save request assertion

This commit is contained in:
Peter Steinberger
2026-05-08 08:03:31 +01:00
parent 7b5d6cfb92
commit 2d1ef7b6b4

View File

@@ -14,8 +14,11 @@ type ChannelsActionHostForTest = ConfigState &
};
function createChannelsSnapshot(name = "saved"): ChannelsStatusSnapshot {
const nostrAccount = { accountId: "default", configured: true, profile: { name } } as
ChannelsStatusSnapshot["channelAccounts"][string][number];
const nostrAccount = {
accountId: "default",
configured: true,
profile: { name },
} as ChannelsStatusSnapshot["channelAccounts"][string][number];
return {
ts: Date.now(),
channelOrder: ["nostr"],
@@ -131,6 +134,6 @@ describe("channel config actions", () => {
expect(host.configFormDirty).toBe(true);
expect(host.configForm).toEqual({ gateway: { mode: "local" } });
expect(host.configSnapshot?.config).toEqual({ gateway: { mode: "remote" } });
expect(request.mock.calls.some(([method]) => method === "channels.status")).toBe(false);
expect(request.mock.calls.map(([method]) => method)).not.toContain("channels.status");
});
});