diff --git a/src/core/parentClient.ts b/src/core/parentClient.ts index 9cd3af1..6f2451a 100644 --- a/src/core/parentClient.ts +++ b/src/core/parentClient.ts @@ -45,7 +45,7 @@ export class ParentClient extends BaseClient { if (response.status != 302 || !response.headers.has("set-cookie")) { await response.body?.cancel(); // Make deno tests happy by closing the body, unsure whether this is needed for the actual library throw new Error( - "Unauthenticated: ClassCharts didn't return authentication cookies" + "Unauthenticated: ClassCharts didn't return authentication cookies", ); } diff --git a/src/core/parentClient_test.ts b/src/core/parentClient_test.ts index 8e78287..6263cef 100644 --- a/src/core/parentClient_test.ts +++ b/src/core/parentClient_test.ts @@ -2,7 +2,7 @@ import { assertRejects } from "~/deps_dev.ts"; import { ParentClient } from "~/src/core/parentClient.ts"; Deno.test("Throws when no email is provided", async () => { - const client = new ParentClient("","password"); + const client = new ParentClient("", "password"); await assertRejects( async () => { await client.login(); @@ -14,25 +14,23 @@ Deno.test("Throws when no email is provided", async () => { // throws when no password is provided Deno.test("Throws when no password is provided", async () => { - const client = new ParentClient("email",""); - await assertRejects( - async () => { - await client.login(); - }, - Error, - "Password not provided", - ); - } -); + const client = new ParentClient("email", ""); + await assertRejects( + async () => { + await client.login(); + }, + Error, + "Password not provided", + ); +}); Deno.test("Throws with invalid login", async () => { - const client = new ParentClient("invalid","invalid"); - await assertRejects( - async () => { - await client.login(); - }, - Error, - "Unauthenticated: ClassCharts didn't return authentication cookies", - ); - }); - \ No newline at end of file + const client = new ParentClient("invalid", "invalid"); + await assertRejects( + async () => { + await client.login(); + }, + Error, + "Unauthenticated: ClassCharts didn't return authentication cookies", + ); +});