From f5b9d2471f3884890c8e71343a047997e81f7730 Mon Sep 17 00:00:00 2001 From: Emil Date: Tue, 24 Feb 2026 10:11:07 +0100 Subject: [PATCH] Fixed failed test --- .claude/settings.local.json | 3 ++- lib/extensions/__tests__/context-factory.test.ts | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index b234b585..41132c0c 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -25,7 +25,8 @@ "Bash(git add:*)", "Bash(git commit:*)", "WebFetch(domain:raw.githubusercontent.com)", - "WebFetch(domain:support.fortnox.se)" + "WebFetch(domain:support.fortnox.se)", + "Bash(npx vitest run:*)" ] } } diff --git a/lib/extensions/__tests__/context-factory.test.ts b/lib/extensions/__tests__/context-factory.test.ts index 210b0f00..c8588e7f 100644 --- a/lib/extensions/__tests__/context-factory.test.ts +++ b/lib/extensions/__tests__/context-factory.test.ts @@ -11,6 +11,17 @@ vi.mock('@/lib/transactions/ingest', () => ({ }), })) +vi.mock('@/lib/logger', () => ({ + createLogger: (module: string) => { + const prefix = `[${module}]` + return { + info: (message: string, ...args: unknown[]) => console.log(prefix, message, ...args), + warn: (message: string, ...args: unknown[]) => console.warn(prefix, message, ...args), + error: (message: string, ...args: unknown[]) => console.error(prefix, message, ...args), + } + }, +})) + beforeEach(() => { eventBus.clear() vi.clearAllMocks()