import { describe, expect, test } from 'vitest';
import { Document, Page, Text, View } from '@react-pdf/renderer';
import renderToImage from './renderComponent';
const PageLayout = ({ children, pageNumber }) => (
<>
{children}
`${n} / ${totalPages}`}
/>
>
);
const blocks = Array.from({ length: 10 }, (_, index) => (
));
const LayoutDocument = () => (
{blocks}
);
describe('page layout', () => {
test('should match snapshot', async () => {
const image = await renderToImage();
expect(image).toMatchImageSnapshot();
});
});