{"size": 1051, "ext": "js", "max_stars_repo_path": "maintenanceless-api/tests/libs/utils/stringUtilsLib.test.js", "max_stars_repo_name": "argerrard/maintenanceless", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "maintenanceless-api/tests/libs/utils/stringUtilsLib.test.js", "max_issues_repo_name": "argerrard/maintenanceless", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "maintenanceless-api/tests/libs/utils/stringUtilsLib.test.js", "max_forks_repo_name": "argerrard/maintenanceless", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 36.2413793103, "max_line_length": 81, "alphanum_fraction": 0.6974310181}
import { isValidEmail } from "../../../libs/utils/stringUtilsLib";

test("testing with a valid e-mails", async () => {
  expect(isValidEmail("testemail@test.com")).toBe(true);
  expect(isValidEmail("test-email@test.com")).toBe(true);
  expect(isValidEmail("test_email123@helloworld.com")).toBe(true);
});

test("testing with an invalid e-mail with no @ sign", async () => {
  expect(isValidEmail("testemailtest.com")).toBe(false);
  expect(isValidEmail("test-email_test.com")).toBe(false);
});

test("testing with a valid e-mail with multiple dots", async () => {
  expect(isValidEmail("test.testuser@google.com")).toBe(true);
  expect(isValidEmail("hello.world.dot@hotmail.com")).toBe(true);
});

test("testing with an invalid e-mail with no dot after the @ sign", async () => {
  expect(isValidEmail("test.testuser@googlecom")).toBe(false);
  expect(isValidEmail("test.testuser@google_com")).toBe(false);
});

test("testing an invalid e-mail string with no @s or .s", async () => {
  expect(isValidEmail("testtestusergooglecom")).toBe(false);
});


