✅ test: fix failing unit tests

This commit is contained in:
2026-02-09 16:16:29 +01:00
parent ef00d37351
commit 527203c635
17 changed files with 104 additions and 280 deletions
@@ -1,15 +1,8 @@
import { screen, render } from '@testing-library/react'
import { RouterProvider, createMemoryRouter } from 'react-router-dom'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { useAnalytics } from 'use-analytics'
import ErrorPage from './index.js'
// Mock the analytics module
vi.mock('use-analytics', () => ({
useAnalytics: () => ({ plugins: { enable: vi.fn(), disable: vi.fn() } }),
}))
// Suppress console.error messages during tests
const originalConsoleError = console.error
console.error = vi.fn()