mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:14:32 +00:00
test(signal): use lightweight clears in sender-prefix and receipts setup
This commit is contained in:
@@ -17,11 +17,11 @@ vi.mock("../pairing/pairing-store.js", () => ({
|
||||
|
||||
describe("signal event handler sender prefix", () => {
|
||||
beforeEach(() => {
|
||||
dispatchMock.mockReset().mockImplementation(async ({ dispatcher, ctx }) => {
|
||||
dispatchMock.mockClear().mockImplementation(async ({ dispatcher, ctx }) => {
|
||||
dispatcher.sendFinalReply({ text: "ok" });
|
||||
return { queuedFinal: true, counts: { tool: 0, block: 0, final: 1 }, ctx };
|
||||
});
|
||||
readAllowFromMock.mockReset().mockResolvedValue([]);
|
||||
readAllowFromMock.mockClear().mockResolvedValue([]);
|
||||
});
|
||||
|
||||
it("prefixes group bodies with sender label", async () => {
|
||||
|
||||
@@ -33,8 +33,8 @@ vi.mock("../pairing/pairing-store.js", () => ({
|
||||
describe("signal event handler typing + read receipts", () => {
|
||||
beforeEach(() => {
|
||||
vi.useRealTimers();
|
||||
sendTypingMock.mockReset().mockResolvedValue(true);
|
||||
sendReadReceiptMock.mockReset().mockResolvedValue(true);
|
||||
sendTypingMock.mockClear().mockResolvedValue(true);
|
||||
sendReadReceiptMock.mockClear().mockResolvedValue(true);
|
||||
dispatchInboundMessageMock.mockClear();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user