mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-18 13:33:51 +00:00
Updated to airbnb coding styles
This commit is contained in:
@@ -12,22 +12,22 @@ describe('<Paginator />', () => {
|
||||
afterEach(() => wrapper?.unmount());
|
||||
|
||||
it.each([
|
||||
[ undefined ],
|
||||
[ buildPaginator() ],
|
||||
[ buildPaginator(0) ],
|
||||
[ buildPaginator(1) ],
|
||||
[undefined],
|
||||
[buildPaginator()],
|
||||
[buildPaginator(0)],
|
||||
[buildPaginator(1)],
|
||||
])('renders nothing if the number of pages is below 2', (paginator) => {
|
||||
wrapper = shallow(<Paginator serverId="abc123" paginator={paginator} />);
|
||||
expect(wrapper.text()).toEqual('');
|
||||
});
|
||||
|
||||
it.each([
|
||||
[ buildPaginator(2), 4, 0 ],
|
||||
[ buildPaginator(3), 5, 0 ],
|
||||
[ buildPaginator(4), 6, 0 ],
|
||||
[ buildPaginator(5), 7, 1 ],
|
||||
[ buildPaginator(6), 7, 1 ],
|
||||
[ buildPaginator(23), 7, 1 ],
|
||||
[buildPaginator(2), 4, 0],
|
||||
[buildPaginator(3), 5, 0],
|
||||
[buildPaginator(4), 6, 0],
|
||||
[buildPaginator(5), 7, 1],
|
||||
[buildPaginator(6), 7, 1],
|
||||
[buildPaginator(23), 7, 1],
|
||||
])('renders previous, next and the list of pages, with ellipses when expected', (
|
||||
paginator,
|
||||
expectedPages,
|
||||
|
||||
Reference in New Issue
Block a user