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()