mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-17 04:20:45 +00:00
test: clarify channel config save request assertion
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user