From 0715cae90faea852159cebfdd80c12b1ec1afcd1 Mon Sep 17 00:00:00 2001 From: Chris O'Donnell <1666298+codfish@users.noreply.github.com> Date: Fri, 22 Mar 2024 03:52:53 -0400 Subject: [PATCH] style: fix js formatting issues (#77) --- index.js | 10 +++++++--- index.test.js | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 2879cef..5d48bee 100644 --- a/index.js +++ b/index.js @@ -86,12 +86,16 @@ async function action() { if (labelsAreRegex) { intersection = appliedLabels.filter((appliedLabel) => providedLabels.some((providedLabel) => - new RegExp(providedLabel, 'i').test(appliedLabel) + new RegExp(providedLabel, "i").test(appliedLabel) ) ); } else { - const lowerCasedAppliedLabels = appliedLabels.map((label) => label.toLowerCase()); - intersection = providedLabels.filter((x) => lowerCasedAppliedLabels.includes(x.toLowerCase())); + const lowerCasedAppliedLabels = appliedLabels.map((label) => + label.toLowerCase() + ); + intersection = providedLabels.filter((x) => + lowerCasedAppliedLabels.includes(x.toLowerCase()) + ); } // Is there an error? diff --git a/index.test.js b/index.test.js index 5885656..8d8a46b 100644 --- a/index.test.js +++ b/index.test.js @@ -474,7 +474,10 @@ describe("Required Labels", () => { expect(core.setOutput).toBeCalledTimes(2); expect(core.setOutput).toBeCalledWith("status", "success"); - expect(core.setOutput).toBeCalledWith("labels", "Needs Code Review,Needs QA Review"); + expect(core.setOutput).toBeCalledWith( + "labels", + "Needs Code Review,Needs QA Review" + ); }); });