From 9596a83f60e24596acca7fdeb194ae734bcfb536 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Sat, 8 Aug 2026 09:03:18 +0200 Subject: [PATCH] fix: use any cast for mock integration in test-connection spec The barrel no longer exports PiHoleIntegrationV6 after the dynamic import refactor. The mock only needs testConnectionAsync, so a type cast is sufficient. --- .../integration-test-connection.spec.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/api/src/router/test/integration/integration-test-connection.spec.ts b/packages/api/src/router/test/integration/integration-test-connection.spec.ts index 0da8356c4..14670b2b7 100644 --- a/packages/api/src/router/test/integration/integration-test-connection.spec.ts +++ b/packages/api/src/router/test/integration/integration-test-connection.spec.ts @@ -23,7 +23,8 @@ describe("testConnectionAsync should run test connection of integration", () => factorySpy.mockReturnValue( Promise.resolve({ testConnectionAsync: async () => await Promise.resolve({ success: true }), - } as homarrIntegrations.PiHoleIntegrationV6), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any), ); optionsSpy.mockReturnValue([["apiKey"]]); @@ -66,7 +67,8 @@ describe("testConnectionAsync should run test connection of integration", () => factorySpy.mockReturnValue( Promise.resolve({ testConnectionAsync: async () => await Promise.resolve({ success: true }), - } as homarrIntegrations.PiHoleIntegrationV6), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any), ); optionsSpy.mockReturnValue([["apiKey"]]); @@ -116,7 +118,8 @@ describe("testConnectionAsync should run test connection of integration", () => factorySpy.mockReturnValue( Promise.resolve({ testConnectionAsync: async () => await Promise.resolve({ success: true }), - } as homarrIntegrations.PiHoleIntegrationV6), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any), ); optionsSpy.mockReturnValue([["apiKey"]]); @@ -166,7 +169,8 @@ describe("testConnectionAsync should run test connection of integration", () => factorySpy.mockReturnValue( Promise.resolve({ testConnectionAsync: async () => await Promise.resolve({ success: true }), - } as homarrIntegrations.PiHoleIntegrationV6), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any), ); optionsSpy.mockReturnValue([["username", "password"], ["apiKey"]]); @@ -220,7 +224,8 @@ describe("testConnectionAsync should run test connection of integration", () => factorySpy.mockReturnValue( Promise.resolve({ testConnectionAsync: async () => await Promise.resolve({ success: true }), - } as homarrIntegrations.PiHoleIntegrationV6), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any), ); optionsSpy.mockReturnValue([["username", "password"], ["apiKey"]]);