mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-27 04:06:39 +00:00
Updated charts to allow optional pagination
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user