import { formatTime } from '../timeHelpers';

describe('formatTime', () => {
  test('should format 0 seconds as "00:00"', () => {
    expect(formatTime(0)).toBe('00:00');
  });

  test('should format seconds less than a minute correctly', () => {
    expect(formatTime(45)).toBe('00:45');
    expect(formatTime(9)).toBe('00:09');
  });

  test('should format exactly one minute correctly', () => {
    expect(formatTime(60)).toBe('01:00');
  });

  test('should format minutes and seconds correctly', () => {
    expect(formatTime(75)).toBe('01:15');
    expect(formatTime(125)).toBe('02:05');
  });

  test('should format larger time values correctly', () => {
    expect(formatTime(3600)).toBe('60:00');
    expect(formatTime(3661)).toBe('61:01');
  });
});
