mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-25 05:00:16 +00:00
14 lines
448 B
TypeScript
14 lines
448 B
TypeScript
|
import { validateEmail } from "./utils";
|
||
|
|
||
|
test("validateEmail returns false for non-emails", () => {
|
||
|
expect(validateEmail(undefined)).toBe(false);
|
||
|
expect(validateEmail(null)).toBe(false);
|
||
|
expect(validateEmail("")).toBe(false);
|
||
|
expect(validateEmail("not-an-email")).toBe(false);
|
||
|
expect(validateEmail("n@")).toBe(false);
|
||
|
});
|
||
|
|
||
|
test("validateEmail returns true for emails", () => {
|
||
|
expect(validateEmail("kody@example.com")).toBe(true);
|
||
|
});
|