import { forEach } from 'ramda';

import { validateEmail } from './validators';

describe('validateEmai', () => {
  const validEmails = ['test@test.com', 'ss@ss.com', 'test@test.co'];
  forEach((validEmail) => {
    it('returns true for valid emails', () => {
      expect(validateEmail(validEmail)).toBe(true);
    });
  }, validEmails);

  const invalidEmails = ['.com', '5', 'testtest'];
  forEach((validEmail) => {
    it('returns false for invalid emails', () => {
      expect(validateEmail(validEmail)).toBe(false);
    });
  }, invalidEmails);
});
