mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 03:54:45 +00:00
test: tighten channel runtime context assertions
This commit is contained in:
@@ -100,19 +100,29 @@ describe("channel runtime context helpers", () => {
|
||||
capability: "approval.native",
|
||||
}),
|
||||
).toEqual({ client: "matrix" });
|
||||
expect(onEvent).toHaveBeenNthCalledWith(
|
||||
1,
|
||||
expect.objectContaining({
|
||||
type: "registered",
|
||||
context: { app: "slack" },
|
||||
}),
|
||||
);
|
||||
expect(onEvent).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
expect.objectContaining({
|
||||
type: "unregistered",
|
||||
}),
|
||||
);
|
||||
expect(onEvent.mock.calls).toEqual([
|
||||
[
|
||||
{
|
||||
type: "registered",
|
||||
key: {
|
||||
channelId: "slack",
|
||||
accountId: "default",
|
||||
capability: "approval.native",
|
||||
},
|
||||
context: { app: "slack" },
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
type: "unregistered",
|
||||
key: {
|
||||
channelId: "slack",
|
||||
accountId: "default",
|
||||
capability: "approval.native",
|
||||
},
|
||||
},
|
||||
],
|
||||
]);
|
||||
|
||||
persistentLease?.dispose();
|
||||
unsubscribe?.();
|
||||
|
||||
Reference in New Issue
Block a user