aboutsummaryrefslogtreecommitdiff
path: root/src/tools/chronometer/chronometer.service.test.ts
blob: 6230ca2e8a195bee95e05dc59b1e1181d6b8dc0a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { describe, expect, it } from 'vitest';
import { formatMs } from './chronometer.service';

describe('chronometer', () => {
  describe('formatChronometerTime', () => {
    it('format the elapsed time', () => {
      expect(formatMs(0)).toEqual('00:00.000');
      expect(formatMs(1)).toEqual('00:00.001');
      expect(formatMs(123456)).toEqual('02:03.456');
      expect(formatMs(12345600)).toEqual('03:25:45.600');
    });
  });
});