mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-19 20:43:56 +00:00
test: guard gateway run loop mock calls
This commit is contained in:
@@ -289,7 +289,7 @@ function expectRestartHandoffCall(expected: {
|
||||
supervisorMode: "external" | "launchd";
|
||||
}) {
|
||||
expect(writeGatewayRestartHandoffSync).toHaveBeenCalledTimes(1);
|
||||
const [handoff] = writeGatewayRestartHandoffSync.mock.calls[0] ?? [];
|
||||
const [handoff] = writeGatewayRestartHandoffSync.mock.calls.at(0) ?? [];
|
||||
if (!handoff || typeof handoff !== "object" || Array.isArray(handoff)) {
|
||||
throw new Error("expected restart handoff options object");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user