import { canBeConvertToDate } from '../src/utils/date';

describe('test canBeConvertToDate()', () => {
  test('null', () => {
    expect(canBeConvertToDate(null)).toBe(false);
  });

  test('undefined', () => {
    expect(canBeConvertToDate(undefined)).toBe(false);
  });

  test('empty string', () => {
    expect(canBeConvertToDate('')).toBe(false);
  });

  test('valid string', () => {
    expect(canBeConvertToDate('2024-10-10T10:10:10+08:00')).toBe(true);
  });

  test('numeric', () => {
    expect(canBeConvertToDate(0)).toBe(true);
  });
});
