diff --git a/resources/js/tests/validate.test.ts b/resources/js/tests/validate.test.ts index f397342..64003b4 100644 --- a/resources/js/tests/validate.test.ts +++ b/resources/js/tests/validate.test.ts @@ -2,27 +2,27 @@ import { expect, describe, it } from "vitest"; import { Email } from "../helpers/validate"; describe("Email()", () => { - it("should return valid=false when an invalid email address is passed to the validate function", () => { + it("should return valid=false when an invalid email address is passed to the validate function", async () => { const v = Email(); - const result = v.validate("invalid email"); + const result = await v.validate("invalid email"); expect(result.valid).toBe(false); }); - it("should return valid=false when an invalid email address is passed to the validate function", () => { + it("should return valid=false when an invalid email address is passed to the validate function", async () => { const v = Email(); - const result = v.validate("fake@outlook"); + const result = await v.validate("fake@outlook"); expect(result.valid).toBe(false); }); - it("should return valid=true when an valid email address is passed to the validate function", () => { + it("should return valid=true when an valid email address is passed to the validate function", async () => { const v = Email(); - const result = v.validate("fake@outlook.com"); + const result = await v.validate("fake@outlook.com"); expect(result.valid).toBe(true); }); - it("should return valid=true when an valid email address is passed to the validate function", () => { + it("should return valid=true when an valid email address is passed to the validate function", async () => { const v = Email(); - const result = v.validate("fake@outlook.com.au"); + const result = await v.validate("fake@outlook.com.au"); expect(result.valid).toBe(true); }); });