From 542de6c540fd8a46440dd6f5308be6da3c07b2bc Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Wed, 25 Mar 2026 10:43:09 +0300 Subject: [PATCH] chore: delete empty lines between test cases --- .../validators/validateEmail/validateEmail.spec.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/features/auth/lib/validators/validateEmail/validateEmail.spec.ts b/src/features/auth/lib/validators/validateEmail/validateEmail.spec.ts index 67ffc33..bdbef6d 100644 --- a/src/features/auth/lib/validators/validateEmail/validateEmail.spec.ts +++ b/src/features/auth/lib/validators/validateEmail/validateEmail.spec.ts @@ -11,15 +11,12 @@ describe("validateEmail", () => { it("should return false if there's no separator (@ symbol)", () => { expect(validateEmail("testexample.com")).toBe(false); }); - it("should return false for an email without a domain extension", () => { expect(validateEmail("test@example")).toBe(false); }); - it("should return false for an email without a domain", () => { expect(validateEmail("test@")).toBe(false); }); - it("should return false for an email with no local part", () => { expect(validateEmail("@example.com")).toBe(false); }); @@ -35,25 +32,20 @@ describe("validateEmail", () => { it("should return false for consecutive dots in local part (unquoted)", () => { expect(validateEmail("john..doe@example.com")).toBe(false); }); - it("should return true for consecutive dots inside a quoted string", () => { expect(validateEmail('"john..doe"@example.com')).toBe(true); }); - it("should return false for leading/trailing dots in local part", () => { expect(validateEmail(".john@example.com")).toBe(false); expect(validateEmail("john.@example.com")).toBe(false); }); - it("should return true for special characters in unquoted local part", () => { expect(validateEmail("!#$%&'*+-/=?^_`{|}~@example.com")).toBe(true); }); - it("should return true for escaped characters and spaces inside quotes", () => { expect(validateEmail('"John Doe"@example.com')).toBe(true); expect(validateEmail('"John\\"Doe"@example.com')).toBe(true); }); - it("should return false if the local part is too long", () => { const longLocalPart = "a".repeat(MAX_LOCAL_PART_LENGTH + 1); expect(validateEmail(longLocalPart + "@example.com")).toBe(false); @@ -64,29 +56,23 @@ describe("validateEmail", () => { it("should return true for a domain starting with a digit", () => { expect(validateEmail("test@123example.com")).toBe(true); }); - it("should return false for a domain label ending with a hyphen", () => { expect(validateEmail("test@example-.com")).toBe(false); }); - it("should return false for a domain label starting with a hyphen", () => { expect(validateEmail("test@-example.com")).toBe(false); }); - it("should return false if a middle label exceeds maximum allowed characters", () => { const longLabel = "a".repeat(MAX_DOMAIN_LABEL_LENGTH + 1); expect(validateEmail(`test@${longLabel}.com`)).toBe(false); }); - it("should return true for complex subdomains", () => { expect(validateEmail("test@sub.sub-label.example.com")).toBe(true); }); - it("should return false if the domain is too long", () => { const longDomain = "a".repeat(MAX_DOMAIN_LENGTH + 1); expect(validateEmail(`test@${longDomain}.com`)).toBe(false); }); - it("should return false if the domain extension is too long", () => { const longExtension = "a".repeat(MAX_DOMAIN_EXTENSION_LENGTH + 1); expect(validateEmail(`test@example.${longExtension}`)).toBe(false);