mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 21:14:31 +00:00
chore: Fix types in tests 25/N.
This commit is contained in:
@@ -864,10 +864,15 @@ describe("runMessageAction accountId defaults", () => {
|
||||
});
|
||||
|
||||
expect(handleAction).toHaveBeenCalled();
|
||||
const ctx = handleAction.mock.calls[0]?.[0] as {
|
||||
accountId?: string | null;
|
||||
params: Record<string, unknown>;
|
||||
};
|
||||
const ctx = (handleAction.mock.calls as unknown as Array<[unknown]>)[0]?.[0] as
|
||||
| {
|
||||
accountId?: string | null;
|
||||
params: Record<string, unknown>;
|
||||
}
|
||||
| undefined;
|
||||
if (!ctx) {
|
||||
throw new Error("expected action context");
|
||||
}
|
||||
expect(ctx.accountId).toBe("ops");
|
||||
expect(ctx.params.accountId).toBe("ops");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user