Files
ServiceManager/frontend/node_modules/react-day-picker/src/components/Footer/Footer.test.tsx
2026-01-01 17:40:53 +01:00

28 lines
627 B
TypeScript

import { customRender } from 'test/render';
import { getTableFooter, queryTableFooter } from 'test/selectors';
import { Footer } from './Footer';
customRender(
<table role="grid">
<Footer />
</table>
);
test('should not render anything as default', () => {
expect(queryTableFooter()).toBeNull();
});
describe('when using the `footer` prop', () => {
beforeEach(() => {
customRender(
<table role="grid">
<Footer />
</table>,
{ footer: 'footer_foo' }
);
});
test('should render the table footer', () => {
expect(getTableFooter()).toHaveTextContent('footer_foo');
});
});