mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-21 16:41:56 +00:00
test(heartbeat): update runner tests to match current implementation
This commit is contained in:
committed by
Peter Steinberger
parent
d35172cce5
commit
1953b938e3
@@ -116,6 +116,7 @@ describe("runHeartbeatOnce – heartbeat model override", () => {
|
||||
expect.objectContaining({
|
||||
isHeartbeat: true,
|
||||
heartbeatModelOverride: "ollama/llama3.2:1b",
|
||||
suppressToolErrorWarnings: false,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -544,8 +544,11 @@ describe("runHeartbeatOnce", () => {
|
||||
expect.objectContaining({
|
||||
Body: expect.stringMatching(/Ops check[\s\S]*Current time: /),
|
||||
SessionKey: sessionKey,
|
||||
From: "+1555",
|
||||
To: "+1555",
|
||||
Provider: "heartbeat",
|
||||
}),
|
||||
expect.objectContaining({ isHeartbeat: true }),
|
||||
expect.objectContaining({ isHeartbeat: true, suppressToolErrorWarnings: false }),
|
||||
cfg,
|
||||
);
|
||||
} finally {
|
||||
@@ -621,8 +624,13 @@ describe("runHeartbeatOnce", () => {
|
||||
expect(sendWhatsApp).toHaveBeenCalledTimes(1);
|
||||
expect(sendWhatsApp).toHaveBeenCalledWith("+1555", "Final alert", expect.any(Object));
|
||||
expect(replySpy).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ SessionKey: sessionKey }),
|
||||
expect.objectContaining({ isHeartbeat: true }),
|
||||
expect.objectContaining({
|
||||
SessionKey: sessionKey,
|
||||
From: "+1555",
|
||||
To: "+1555",
|
||||
Provider: "heartbeat",
|
||||
}),
|
||||
expect.objectContaining({ isHeartbeat: true, suppressToolErrorWarnings: false }),
|
||||
cfg,
|
||||
);
|
||||
} finally {
|
||||
@@ -699,8 +707,13 @@ describe("runHeartbeatOnce", () => {
|
||||
expect(sendWhatsApp).toHaveBeenCalledTimes(1);
|
||||
expect(sendWhatsApp).toHaveBeenCalledWith(groupId, "Group alert", expect.any(Object));
|
||||
expect(replySpy).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ SessionKey: groupSessionKey }),
|
||||
expect.objectContaining({ isHeartbeat: true }),
|
||||
expect.objectContaining({
|
||||
SessionKey: groupSessionKey,
|
||||
From: groupId,
|
||||
To: groupId,
|
||||
Provider: "heartbeat",
|
||||
}),
|
||||
expect.objectContaining({ isHeartbeat: true, suppressToolErrorWarnings: false }),
|
||||
cfg,
|
||||
);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user