21 lines
881 B
TypeScript
21 lines
881 B
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import { describe, it, expect } from 'vitest';
|
|
import { MarcoRetrato } from '../MarcoRetrato';
|
|
|
|
describe('<MarcoRetrato />', () => {
|
|
it('renders whatever portrait it is given', () => {
|
|
render(<MarcoRetrato><span>retrato</span></MarcoRetrato>);
|
|
expect(screen.getByText('retrato')).toBeInTheDocument();
|
|
});
|
|
|
|
it('keeps the frame decorative: the portrait carries the meaning', () => {
|
|
const { container } = render(<MarcoRetrato><span>retrato</span></MarcoRetrato>);
|
|
expect(container.querySelector('svg')).toHaveAttribute('aria-hidden', 'true');
|
|
});
|
|
|
|
it('draws the arc that will survive the real photograph landing', () => {
|
|
const { container } = render(<MarcoRetrato><span>retrato</span></MarcoRetrato>);
|
|
expect(container.querySelectorAll('circle').length).toBeGreaterThanOrEqual(1);
|
|
});
|
|
});
|