From f5a3c5cae233ad6800e1e7e7bd97fe963443c53e Mon Sep 17 00:00:00 2001 From: chinodesuuu Date: Tue, 27 Aug 2024 14:31:40 +0000 Subject: [PATCH] use assertIsError Signed-off-by: chinodesuuu --- test/deno/sagiri.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/deno/sagiri.test.ts b/test/deno/sagiri.test.ts index 700e375f..a9c3ebef 100644 --- a/test/deno/sagiri.test.ts +++ b/test/deno/sagiri.test.ts @@ -1,12 +1,12 @@ -import { assertEquals, assertExists } from "@std/assert"; +import { assertIsError, assertExists } from "@std/assert"; import sagiri from "../../lib/sagiri.ts"; Deno.test("should fail on invalid characters", () => { - assertEquals(() => {sagiri("!!!!!*&#@(!)")}, Function); + assertIsError(sagiri("!!!!!*&#@(!)"), Function); }); Deno.test("should fail on invalid length", () => { - assertEquals(() => {sagiri("7".repeat(27))}, Function); + assertIsError(sagiri("7".repeat(27)), Error); }); Deno.test("Resolve with results", () => {