mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-16 18:34:18 +00:00
test: dedupe daemon service mock read
This commit is contained in:
@@ -37,7 +37,7 @@ function createGatewayParentLikeCommand() {
|
||||
|
||||
function expectSingleDaemonCall(mockFn: ReturnType<typeof vi.fn>) {
|
||||
expect(mockFn).toHaveBeenCalledTimes(1);
|
||||
const opts = mockFn.mock.calls.at(0)?.[0] as Record<string, unknown> | undefined;
|
||||
const opts = mockFn.mock.calls[0]?.[0] as Record<string, unknown> | undefined;
|
||||
if (opts === undefined) {
|
||||
throw new Error("expected daemon call options");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user