import { describe, it, expect } from 'vitest';
import { render } from '@testing-library/react';
import { Layout } from '../layout/Layout';
import { Section } from '../layout/Section';
import { PullQuote } from '../media/PullQuote';
describe('PullQuote', () => {
const wrap = (ui: React.ReactElement) => render(
);
it('renders as aside with border-top and border-bottom', () => {
const { container } = wrap(quote text);
const aside = container.querySelector('aside') as HTMLElement;
expect(aside).toBeTruthy();
expect(aside.style.borderTop).toContain('1px solid');
expect(aside.style.borderBottom).toContain('1px solid');
});
it('renders author in footer', () => {
const { getByText } = wrap(quote);
expect(getByText('— John')).toBeTruthy();
});
it('applies spanAllColumns class', () => {
const { container } = wrap(quote);
const aside = container.querySelector('aside');
expect(aside?.classList.contains('nui-span-all-columns')).toBe(true);
});
});