chore: format web monitor inbox tests

This commit is contained in:
Peter Steinberger
2026-01-16 09:26:14 +00:00
parent 6fa437613b
commit 4c14d6c8db
2 changed files with 84 additions and 14 deletions

View File

@@ -113,7 +113,12 @@ describe("web monitor inbox", () => {
});
const onMessage = vi.fn();
const listener = await monitorWebInbox({ verbose: false, accountId: ACCOUNT_ID, authDir, onMessage });
const listener = await monitorWebInbox({
verbose: false,
accountId: ACCOUNT_ID,
authDir,
onMessage,
});
const sock = await createWaSocket();
const upsert = {
@@ -168,7 +173,12 @@ describe("web monitor inbox", () => {
});
const onMessage = vi.fn();
const listener = await monitorWebInbox({ verbose: false, accountId: ACCOUNT_ID, authDir, onMessage });
const listener = await monitorWebInbox({
verbose: false,
accountId: ACCOUNT_ID,
authDir,
onMessage,
});
const sock = await createWaSocket();
// Message from self (sock.user.id is "123@s.whatsapp.net" in mock)
@@ -211,7 +221,12 @@ describe("web monitor inbox", () => {
.mockResolvedValueOnce({ code: "PAIRCODE", created: false });
const onMessage = vi.fn();
const listener = await monitorWebInbox({ verbose: false, accountId: ACCOUNT_ID, authDir, onMessage });
const listener = await monitorWebInbox({
verbose: false,
accountId: ACCOUNT_ID,
authDir,
onMessage,
});
const sock = await createWaSocket();
// Message from someone else should be blocked
@@ -316,7 +331,12 @@ describe("web monitor inbox", () => {
});
const onMessage = vi.fn();
const listener = await monitorWebInbox({ verbose: false, accountId: ACCOUNT_ID, authDir, onMessage });
const listener = await monitorWebInbox({
verbose: false,
accountId: ACCOUNT_ID,
authDir,
onMessage,
});
const sock = await createWaSocket();
const upsert = {
@@ -367,7 +387,12 @@ describe("web monitor inbox", () => {
});
const onMessage = vi.fn();
const listener = await monitorWebInbox({ verbose: false, accountId: ACCOUNT_ID, authDir, onMessage });
const listener = await monitorWebInbox({
verbose: false,
accountId: ACCOUNT_ID,
authDir,
onMessage,
});
const sock = await createWaSocket();
const upsert = {
@@ -405,7 +430,12 @@ describe("web monitor inbox", () => {
it("handles append messages by marking them read but skipping auto-reply", async () => {
const onMessage = vi.fn();
const listener = await monitorWebInbox({ verbose: false, accountId: ACCOUNT_ID, authDir, onMessage });
const listener = await monitorWebInbox({
verbose: false,
accountId: ACCOUNT_ID,
authDir,
onMessage,
});
const sock = await createWaSocket();
const upsert = {