mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-06 03:33:02 +03:00
Updated charts to allow optional pagination
This commit is contained in:
parent
c094a27c97
commit
61480abd2e
10 changed files with 180 additions and 96 deletions
test/utils
|
@ -8,6 +8,7 @@ import {
|
|||
determineOrderDir,
|
||||
fixLeafletIcons,
|
||||
rangeOf,
|
||||
roundTen,
|
||||
} from '../../src/utils/utils';
|
||||
|
||||
describe('utils', () => {
|
||||
|
@ -87,4 +88,21 @@ describe('utils', () => {
|
|||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('roundTen', () => {
|
||||
it('rounds provided number to the next multiple of ten', () => {
|
||||
const expectationsPairs = [
|
||||
[ 10, 10 ],
|
||||
[ 12, 20 ],
|
||||
[ 158, 160 ],
|
||||
[ 5, 10 ],
|
||||
[ -42, -40 ],
|
||||
];
|
||||
|
||||
expect.assertions(expectationsPairs.length);
|
||||
expectationsPairs.forEach(([ number, expected ]) => {
|
||||
expect(roundTen(number)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue