Fixed failed test

This commit is contained in:
Emil
2026-02-24 10:11:07 +01:00
parent d9230950db
commit f5b9d2471f
2 changed files with 13 additions and 1 deletions
+2 -1
View File
@@ -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:*)"
]
}
}
@@ -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()