Fixed unit tests

This commit is contained in:
Alejandro Celaya 2020-04-04 10:36:34 +02:00
parent e6034dfb14
commit 2bd70fb9e6
7 changed files with 38 additions and 33 deletions
test/utils

View file

@ -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);
});
});
});
});