chore: fix linting issues in ack-reaction feature

- Remove unused mock variables in tests
- Remove unused ackReactionScope variables in simple test cases
- Fix line length for ackReactionScope declaration
- All lint checks passing (0 warnings, 0 errors)
- All tests passing (8/8)
This commit is contained in:
sheeek
2026-01-09 23:47:50 +01:00
committed by Peter Steinberger
parent c3587d6cae
commit d38b232724
2 changed files with 2 additions and 9 deletions

View File

@@ -2,12 +2,6 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
import type { ClawdbotConfig } from "../config/types.js";
describe("WhatsApp ack reaction", () => {
const mockSendReaction = vi.fn(async () => {});
const mockGetReply = vi.fn(async () => ({
payloads: [{ text: "test reply" }],
meta: {},
}));
beforeEach(() => {
vi.clearAllMocks();
});
@@ -265,7 +259,6 @@ describe("WhatsApp ack reaction", () => {
};
const ackReaction = (cfg.messages?.ackReaction ?? "").trim();
const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions";
const didSendReply = false; // No reply sent
const shouldAckReaction = () => {
@@ -296,7 +289,6 @@ describe("WhatsApp ack reaction", () => {
};
const ackReaction = (cfg.messages?.ackReaction ?? "").trim();
const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions";
const didSendReply = true;
const shouldAckReaction = () => {

View File

@@ -1389,7 +1389,8 @@ export async function monitorWebProvider(
// Send ack reaction after successful reply
const ackReaction = (cfg.messages?.ackReaction ?? "").trim();
const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions";
const ackReactionScope =
cfg.messages?.ackReactionScope ?? "group-mentions";
const shouldAckReaction = () => {
if (!ackReaction) return false;
if (!msg.id) return false;