From e20ff101367b70862df162c277099b2b52694cb2 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 07:15:22 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20[Code=20Health]=20Remove=20any?= =?UTF-8?q?=20types=20in=20ThemeController=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com> --- src/components/__tests__/ThemeController.test.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/__tests__/ThemeController.test.tsx b/src/components/__tests__/ThemeController.test.tsx index 76628f1d..23bbc6d2 100644 --- a/src/components/__tests__/ThemeController.test.tsx +++ b/src/components/__tests__/ThemeController.test.tsx @@ -13,11 +13,11 @@ const { mockGetColorAsync, mockDestroy } = vi.hoisted(() => ({ // The hook uses fast-average-color, which we need to mock so it doesn't try to fetch real images in tests. vi.mock("fast-average-color", () => { return { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - FastAverageColor: vi.fn().mockImplementation(function(this: any) { - this.getColorAsync = mockGetColorAsync; - this.destroy = mockDestroy; - return this; + FastAverageColor: vi.fn().mockImplementation(function() { + return { + getColorAsync: mockGetColorAsync, + destroy: mockDestroy, + }; }), }; }); @@ -44,8 +44,7 @@ describe("ThemeController", () => { value: [100, 150, 200, 255] }); // Ensure adjustAccentColor mock implementation is restored - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (colorLib.adjustAccentColor as any).mockImplementation((color: any) => ({ + vi.mocked(colorLib.adjustAccentColor).mockImplementation((color) => ({ accent: `mock-accent-${color}`, accentRgb: `mock-rgb-${color}`, accentHover: `mock-hover-${color}`,