From d16044ea9c84bdaaff5a7248c5df4bbebc83bb69 Mon Sep 17 00:00:00 2001 From: chinodesuuu Date: Tue, 27 Aug 2024 14:41:19 +0000 Subject: [PATCH] somehow I'm confused assertIsError is different from assertThrows wtf Signed-off-by: chinodesuuu --- test/deno/sagiri.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/deno/sagiri.test.ts b/test/deno/sagiri.test.ts index 23484d41..b61ee142 100644 --- a/test/deno/sagiri.test.ts +++ b/test/deno/sagiri.test.ts @@ -1,14 +1,14 @@ -import { assertIsError, assertExists } from "@std/assert"; +import { assertThrows, assertExists } from "@std/assert"; import sagiri from "../../lib/sagiri.ts"; Deno.test("should fail on invalid characters", () => { - assertIsError(sagiri("!!!!!*&#@(!)")); + assertThrows(() => { sagiri("!!!!!*&#@(!)") }); }); Deno.test("should fail on invalid length", () => { - assertIsError(sagiri("7".repeat(27))); + assertThrows(() => { sagiri("7".repeat(27)) }); }); Deno.test("Resolve with results", () => { - assertExists(()=> {sagiri(Deno.env.get("SAUCENAO_TOKEN")!)("https://i.imgur.com/F9QSgPx.jpeg")}, "pixiv"); + assertExists(() => { sagiri(Deno.env.get("SAUCENAO_TOKEN")!)("https://i.imgur.com/F9QSgPx.jpeg") }, "pixiv"); })