const { VALID_GENDERS, normalizeGender } = require('../src/utils/gender');

describe('gender utilities', () => {
  it('normalizes supported values and aliases', () => {
    expect(normalizeGender(' Male ')).toBe('male');
    expect(normalizeGender('F')).toBe('female');
    expect(normalizeGender('OTHER')).toBe('other');
    expect(normalizeGender('')).toBeNull();
    expect(normalizeGender(null)).toBeNull();
  });

  it('leaves unsupported values available for validation', () => {
    const gender = normalizeGender('unknown');
    expect(VALID_GENDERS.includes(gender)).toBe(false);
  });
});
