diff --git a/packages/utils/colors.spec.ts b/packages/utils/colors.spec.ts index 0cd5f67..c48279d 100644 --- a/packages/utils/colors.spec.ts +++ b/packages/utils/colors.spec.ts @@ -15,9 +15,7 @@ describe("colors", () => { it("converts rgb to hex", () => expect(rgbToHex(12, 44, 120)).toEqual("#0c2c78")) it("converts string to hex", () => - expect(rgbToHex("12", "44", "120")).toEqual( - "#0c2c78", - )) + expect(rgbToHex("12", "44", "120")).toEqual("#0c2c78")) it("converts null to hex", () => expect(rgbToHex(null, 44, 120)).toEqual("#002c78")) it("returns undefined to hex", () => diff --git a/packages/utils/slug.spec.ts b/packages/utils/slug.spec.ts index 339325e..5fd892a 100644 --- a/packages/utils/slug.spec.ts +++ b/packages/utils/slug.spec.ts @@ -8,16 +8,13 @@ describe("slug", () => { it("returns valid from special string", () => expect(getSlug("#$%^B#uR#n-")).toEqual("burn-")) it("returns valid from parens string", () => - expect(getSlug("Gaussian Blur [1](2){3}")).toEqual( - "gaussian-blur-123", - )) + expect(getSlug("Gaussian Blur [1](2){3}")).toEqual("gaussian-blur-123")) it("replaces àáäâèéëêìíïîòóöôùúüûñç", () => expect(getSlug("àáäâèéëêìíïîòóöôùúüûñç")).toEqual( "aaaaeeeeiiiioooouuuunc", )) it("fails silently from undefined", () => expect(getSlug(undefined)).toEqual("")) - it("fails silently from null", () => - expect(getSlug(null)).toEqual("")) + it("fails silently from null", () => expect(getSlug(null)).toEqual("")) }) }) diff --git a/packages/utils/strings.spec.ts b/packages/utils/strings.spec.ts index c3a9c3c..06d28dc 100644 --- a/packages/utils/strings.spec.ts +++ b/packages/utils/strings.spec.ts @@ -19,18 +19,16 @@ describe("strings", () => { "a link hello", )) it("removes a bold link", () => - expect( - removeMarkdown("a [bold **link**](https://x.com) hello"), - ).toEqual("a bold link hello")) + expect(removeMarkdown("a [bold **link**](https://x.com) hello")).toEqual( + "a bold link hello", + )) }) describe("middleEllipsis", () => { it("works with short word", () => expect(middleEllipsis("ellipsis", 5)).toEqual("e...s")) it("works with longer word", () => - expect(middleEllipsis("lorem ipsum dolor", 12)).toEqual( - "lore...olor", - )) + expect(middleEllipsis("lorem ipsum dolor", 12)).toEqual("lore...olor")) it("fails silently for undefined", () => expect(middleEllipsis(null, 12)).toEqual("")) }) diff --git a/packages/utils/uuid.spec.ts b/packages/utils/uuid.spec.ts index 46418db..cfd74a9 100644 --- a/packages/utils/uuid.spec.ts +++ b/packages/utils/uuid.spec.ts @@ -5,8 +5,7 @@ describe("validations", () => { describe("getUUID", () => { const MOCK_UUID = getUUID() - it("returns test uuid", () => - expect(getUUID(MOCK_UUID)).toEqual(TEST_UUID)) + it("returns test uuid", () => expect(getUUID(MOCK_UUID)).toEqual(TEST_UUID)) it("returns any string", () => expect(getUUID("any-string")).toEqual("any-string")) }) @@ -14,11 +13,8 @@ describe("validations", () => { describe("isUUID", () => { it("validates test uuid", () => expect(isUUID(TEST_UUID)).toEqual(true)) it("validates a random uuid", () => - expect(isUUID("101bfe56-8c16-4f94-9b45-759ea5e67cea")).toEqual( - true, - )) + expect(isUUID("101bfe56-8c16-4f94-9b45-759ea5e67cea")).toEqual(true)) it("catches empty string", () => expect(isUUID("")).toEqual(false)) - it("catches undefined", () => - expect(isUUID(undefined)).toEqual(false)) + it("catches undefined", () => expect(isUUID(undefined)).toEqual(false)) }) }) diff --git a/packages/utils/validations.spec.ts b/packages/utils/validations.spec.ts index c28cacb..24f6ea4 100644 --- a/packages/utils/validations.spec.ts +++ b/packages/utils/validations.spec.ts @@ -3,16 +3,14 @@ import { it, describe, expect } from "vitest" describe("validations", () => { describe("validateEmail", () => { - it("validates email", () => - expect(validateEmail("x@x.com")).toEqual(true)) + it("validates email", () => expect(validateEmail("x@x.com")).toEqual(true)) it("validates email with +", () => expect(validateEmail("x+x@x.com")).toEqual(true)) it("validates email with long tld", () => expect(validateEmail("0@helios.graphics")).toEqual(true)) it("catches long invalid string", () => expect(validateEmail("@space.city")).toEqual(false)) - it("catches empty string", () => - expect(validateEmail("")).toEqual(false)) + it("catches empty string", () => expect(validateEmail("")).toEqual(false)) it("catches undefined", () => expect(validateEmail(undefined)).toEqual(false)) it("catches multi @", () => @@ -25,9 +23,7 @@ describe("validations", () => { it("validates url", () => expect(validateHttpUrl("https://x.com")).toEqual(true)) it("validates url with long tld", () => - expect(validateHttpUrl("https://lorem-ipsum.graphics")).toEqual( - true, - )) + expect(validateHttpUrl("https://lorem-ipsum.graphics")).toEqual(true)) it("validates url with double subdomain", () => expect(validateHttpUrl("https://0.x.x.com")).toEqual(true)) it("catches ftp", () => @@ -36,8 +32,7 @@ describe("validations", () => { expect(validateHttpUrl("lorem ipsum https://x.com")).toEqual(false)) it("catches unsafe http", () => expect(validateHttpUrl("http://x.com")).toEqual(false)) - it("catches empty string", () => - expect(validateHttpUrl("")).toEqual(false)) + it("catches empty string", () => expect(validateHttpUrl("")).toEqual(false)) it("catches undefined", () => expect(validateHttpUrl(undefined)).toEqual(false)) })