From 00acdf2de60c83127f00cff9882de4939b878858 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Thu, 3 Oct 2024 18:58:10 -0400 Subject: [PATCH] test: restore 100% coverage --- src/hook.ts | 3 ++- src/types.ts | 6 +++--- vite.config.js | 5 +---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/hook.ts b/src/hook.ts index 029efb1c..6094d61f 100644 --- a/src/hook.ts +++ b/src/hook.ts @@ -121,7 +121,7 @@ async function sendRequestWithRetries( ): Promise { const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt); - /* v8 ignore next - due to skipped tests, see https://github.com/octokit/auth-app.js/pull/580 */ + /* v8 ignore start - due to skipped tests, see https://github.com/octokit/auth-app.js/pull/580 */ try { return await request(options); } catch (error: any) { @@ -150,4 +150,5 @@ async function sendRequestWithRetries( return sendRequestWithRetries(state, request, options, createdAt, retries); } + /* v8 ignore end */ } diff --git a/src/types.ts b/src/types.ts index 07543f52..5da72aac 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,6 +1,6 @@ -import * as OctokitTypes from "@octokit/types"; -import { LRUCache } from "lru-cache"; -import * as OAuthAppAuth from "@octokit/auth-oauth-app"; +import type * as OctokitTypes from "@octokit/types"; +import type { LRUCache } from "lru-cache"; +import type * as OAuthAppAuth from "@octokit/auth-oauth-app"; // STRATEGY OPTIONS diff --git a/vite.config.js b/vite.config.js index e5e179e8..3445d614 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,10 +6,7 @@ export default defineConfig({ include: ["src/**/*.ts"], reporter: ["html"], thresholds: { - lines: 69.23, - functions: 93.33, - statements: 69.23, - branches: 96.15, + 100: true }, }, },