- expect(response.count).toBe(2);
- });
-
- test('uses hours if the time is < 1 days', () => {
-
- const response = readableTime(23 * 60 * 60 * 1000);
-
- expect(response.label).toContain('hours');
- });
-
- test('correctly divides miliseconds into days', () => {
-
- const response = readableTime(2 * 24 * 60 * 60 * 1000);
-
- expect(response.count).toBe(2);
- });
-
- test('uses days if the time is >= 1 day', () => {
-
- const response = readableTime(364 * 24 * 60 * 60 * 1000);
-
- expect(response.label).toContain('days');
- });
-
- test('uses days as the maximum unit', () => {
-
- const response = readableTime(Number.MAX_VALUE);
-
- expect(response.label).toContain('days');
- });