From 56a31a26bcde347ab9b3fc72655ef3319cd7848f Mon Sep 17 00:00:00 2001 From: Nick Floyd Date: Thu, 13 Feb 2025 11:50:02 -0600 Subject: [PATCH] fix: linting issues --- test/paginate.test.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/paginate.test.ts b/test/paginate.test.ts index c27009aa..8cea2eb5 100644 --- a/test/paginate.test.ts +++ b/test/paginate.test.ts @@ -27,18 +27,22 @@ describe("pagination", () => { const startTime = performance.now(); try { for await (const normalizedResponse of octokit.paginate.iterator( - "GET /repos/{owner}/{repo}/issues", { owner: "DayShift", repo: "ReDos", per_page: 100 } - )) {} + "GET /repos/{owner}/{repo}/issues", + { owner: "DayShift", repo: "ReDos", per_page: 100 }, + )) { + } } catch (error) { // pass } const endTime = performance.now(); const elapsedTime = endTime - startTime; - const reDosThreshold = 2000; - + const reDosThreshold = 2000; + expect(elapsedTime).toBeLessThanOrEqual(reDosThreshold); if (elapsedTime > reDosThreshold) { - console.warn(`🚨 Potential ReDoS Attack! getDuration method took ${elapsedTime.toFixed(2)} ms, exceeding threshold of ${reDosThreshold} ms.`); + console.warn( + `🚨 Potential ReDoS Attack! getDuration method took ${elapsedTime.toFixed(2)} ms, exceeding threshold of ${reDosThreshold} ms.`, + ); } });