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 = {

View File

@@ -115,7 +115,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 unauthorized sender +999 (not in allowFrom)
@@ -176,7 +181,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 = {
@@ -252,7 +262,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 = {
@@ -293,7 +308,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 = {
@@ -337,7 +357,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 = {
@@ -381,7 +406,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 = {
@@ -428,7 +458,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 = {
@@ -473,7 +508,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 = {