mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
test: tighten telegram approval delivery assertions
This commit is contained in:
@@ -100,24 +100,19 @@ describe("telegramApprovalNativeRuntime", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(sendTyping).toHaveBeenCalledWith(
|
||||
"-1003841603622",
|
||||
expect.objectContaining({
|
||||
token: "tg-token",
|
||||
accountId: "default",
|
||||
messageThreadId: 928,
|
||||
}),
|
||||
);
|
||||
expect(sendMessage).toHaveBeenCalledWith(
|
||||
"-1003841603622",
|
||||
"pending",
|
||||
expect.objectContaining({
|
||||
token: "tg-token",
|
||||
accountId: "default",
|
||||
messageThreadId: 928,
|
||||
buttons: [],
|
||||
}),
|
||||
);
|
||||
expect(sendTyping).toHaveBeenCalledWith("-1003841603622", {
|
||||
cfg: {},
|
||||
token: "tg-token",
|
||||
accountId: "default",
|
||||
messageThreadId: 928,
|
||||
});
|
||||
expect(sendMessage).toHaveBeenCalledWith("-1003841603622", "pending", {
|
||||
cfg: {},
|
||||
token: "tg-token",
|
||||
accountId: "default",
|
||||
buttons: [],
|
||||
messageThreadId: 928,
|
||||
});
|
||||
expect(entry).toEqual({
|
||||
chatId: "-1003841603622",
|
||||
messageId: "m1",
|
||||
|
||||
@@ -8,13 +8,10 @@ describe("Telegram native quote candidates", () => {
|
||||
maxLength: 10,
|
||||
});
|
||||
|
||||
expect(candidate).toEqual(
|
||||
expect.objectContaining({
|
||||
text: " quoted c",
|
||||
position: 0,
|
||||
}),
|
||||
);
|
||||
expect(candidate).not.toHaveProperty("entities");
|
||||
expect(candidate).toEqual({
|
||||
text: " quoted c",
|
||||
position: 0,
|
||||
});
|
||||
});
|
||||
|
||||
it("does not split UTF-16 surrogate pairs at the quote cap", () => {
|
||||
|
||||
Reference in New Issue
Block a user