import { render, screen } from '@testing-library/react'
import { describe, it, expect, vi } from 'vitest'
import LossChart from './LossChart'
// Mock recharts to avoid rendering SVG complexity in JSDOM
vi.mock('recharts', () => ({
ResponsiveContainer: ({ children }) =>
{children}
,
LineChart: ({ children }) => {children}
,
Line: () => ,
XAxis: () => ,
YAxis: () => ,
Tooltip: () => ,
ReferenceLine: () =>
}))
describe('LossChart', () => {
it('renders a loading state initially', () => {
render()
expect(screen.getByText('Loading chart data...')).toBeInTheDocument()
})
})