mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 17:40:23 +03:00
14 lines
462 B
TypeScript
14 lines
462 B
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import { MemoryRouter } from 'react-router-dom';
|
|
import { ScrollToTop } from '../../src/common/ScrollToTop';
|
|
|
|
describe('<ScrollToTop />', () => {
|
|
it.each([
|
|
['Foobar'],
|
|
['Barfoo'],
|
|
['Something'],
|
|
])('just renders children', (children) => {
|
|
render(<MemoryRouter><ScrollToTop>{children}</ScrollToTop></MemoryRouter>);
|
|
expect(screen.getByText(children)).toBeInTheDocument();
|
|
});
|
|
});
|