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"); })