debian-mirror-gitlab/spec/frontend/pages/users/activity_calendar_spec.js
2021-09-04 01:27:46 +05:30

16 lines
374 B
JavaScript

import { getLevelFromContributions } from '~/pages/users/activity_calendar';
describe('getLevelFromContributions', () => {
it.each([
[0, 0],
[1, 1],
[9, 1],
[10, 2],
[19, 2],
[20, 3],
[30, 4],
[99, 4],
])('.getLevelFromContributions(%i, %i)', (count, expected) => {
expect(getLevelFromContributions(count)).toBe(expected);
});
});