add unit tests
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2026-02-24 11:33:37 +01:00
parent e17c82de2f
commit 4fc3738adf
19 changed files with 1427 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
import type { ReactElement } from 'react';
import { MemoryRouter } from 'react-router-dom';
import { render } from '@testing-library/react';
type RenderWithRouterOptions = {
route?: string;
};
export function renderWithRouter(ui: ReactElement, options: RenderWithRouterOptions = {}) {
const { route = '/' } = options;
return render(<MemoryRouter initialEntries={[route]}>{ui}</MemoryRouter>);
}