mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-04 10:43:01 +03:00
Fixed unit tests
This commit is contained in:
parent
e6034dfb14
commit
2bd70fb9e6
7 changed files with 38 additions and 33 deletions
test/utils
|
@ -7,7 +7,6 @@ import {
|
|||
determineOrderDir,
|
||||
fixLeafletIcons,
|
||||
rangeOf,
|
||||
roundTen,
|
||||
} from '../../src/utils/utils';
|
||||
|
||||
describe('utils', () => {
|
||||
|
@ -86,21 +85,4 @@ 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