From 5a8305566633a92b5d279b4f7b186a280fdd3e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belin?= Date: Wed, 24 Jan 2024 16:03:26 +0100 Subject: [PATCH] Code formatting [slip ci] --- test/client_test.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/test/client_test.js b/test/client_test.js index a0c6191c..cf3489b6 100644 --- a/test/client_test.js +++ b/test/client_test.js @@ -41,12 +41,11 @@ describe("Client", () => { }); describe("checkComment()", () => { - it("should return `CheckResult.ham` for valid comment (e.g. ham)", async () => { - equal(await client.checkComment(ham), CheckResult.ham); - }); + it("should return `CheckResult.ham` for valid comment (e.g. ham)", async () => + equal(await client.checkComment(ham), CheckResult.ham)); it("should return `CheckResult.spam` for invalid comment (e.g. spam)", async () => { - const isSpam = /** @type {CheckResult[]} */ ([CheckResult.spam, CheckResult.pervasiveSpam]); + const isSpam = [CheckResult.spam, CheckResult.pervasiveSpam]; ok(isSpam.includes(await client.checkComment(spam))); }); }); @@ -60,12 +59,10 @@ describe("Client", () => { }); describe("verifyKey()", () => { - it("should return `true` for a valid API key", async () => { - ok(await client.verifyKey()); - }); + it("should return `true` for a valid API key", async () => + ok(await client.verifyKey())); - it("should return `false` for an invalid API key", async () => { - equal(await new Client("0123456789-ABCDEF", client.blog, {isTest: true}).verifyKey(), false); - }); + it("should return `false` for an invalid API key", async () => + equal(await new Client("0123456789-ABCDEF", client.blog, {isTest: true}).verifyKey(), false)); }); });