veza/apps/web/src/test/setup.test.tsx
2025-12-12 21:34:34 -05:00

26 lines
818 B
TypeScript

import { describe, it, expect } from 'vitest';
import { render, screen } from './helpers';
import React from 'react';
// Composant de test simple
const TestComponent = () => <div>Test Component</div>;
describe('Test Setup', () => {
it('should render component with providers', () => {
render(<TestComponent />);
expect(screen.getByText('Test Component')).toBeInTheDocument();
});
it('should have testing library available', () => {
const { container } = render(<TestComponent />);
expect(container).toBeInTheDocument();
});
it('should cleanup after each test', () => {
const { unmount } = render(<TestComponent />);
expect(screen.getByText('Test Component')).toBeInTheDocument();
unmount();
expect(screen.queryByText('Test Component')).not.toBeInTheDocument();
});
});