import { describe, expect, it } from 'vitest';
import { Timestamp } from '../../components/Utils/Transformers/Timestamp';
import { timestampValidator } from './timestamp';

describe('timestampValidator', () => {
  const timeStamp: Timestamp = '00:02:00.000';
  const invalidTimestamp = '00:02:00.00';

  it.each([
    [timeStamp, true],
    [invalidTimestamp, false],
    [null, false],
    [undefined, false],
    ['', false],
    [0, false],
  ])('%p should return %p', (value, expected) => {
    const result = timestampValidator(value as string);
    expect(result).toBe(expected);
  });
});
