import { isHexColor } from './isHexColor';

describe('isHexColor', () => {
  test('valid hex color with hashtag', () => {
    expect(isHexColor('#FF0000')).toBe(true);
  });

  test('valid hex color without hashtag', () => {
    expect(isHexColor('FF0000')).toBe(false);
  });

  test('valid hex color with 3 characters', () => {
    expect(isHexColor('#F00')).toBe(true);
  });

  test('valid hex color with lowercase characters', () => {
    expect(isHexColor('#123abc')).toBe(true);
  });

  test('invalid hex color with special characters', () => {
    expect(isHexColor('#12G')).toBe(false);
  });
});
