mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-17 21:13:48 +00:00
Move shlink-web-component tests to their own folder
This commit is contained in:
20
shlink-web-component/test/utils/helpers/numbers.test.ts
Normal file
20
shlink-web-component/test/utils/helpers/numbers.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { roundTen } from '../../../src/utils/helpers/numbers';
|
||||
|
||||
describe('numbers', () => {
|
||||
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