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.
This commit is contained in:
Thomas Camlong committed 2026-08-08 09:03:18 +02:00
1 parent e036cd86d8
commit 9596a83f60
1 file changed
+10 -5
@@ -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"]]);