import { render, screen } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import { StatsCard } from './stats-card';
import React from 'react';
describe('StatsCard', () => {
it('renders correctly with title and value', () => {
render();
expect(screen.getByText('Total Users')).toBeInTheDocument();
expect(screen.getByText('1,234')).toBeInTheDocument();
});
it('renders trend indicator correctly', () => {
render(
);
expect(screen.getByText('20.1%')).toBeInTheDocument();
expect(screen.getByText('from last month')).toBeInTheDocument();
});
it('renders icon correctly', () => {
render(
Icon} />
);
expect(screen.getByTestId('test-icon')).toBeInTheDocument();
});
});