From d5a413382c93efeb1d888daf3216c51cd5f40f75 Mon Sep 17 00:00:00 2001
From: Adam Mathes <adam@adammathes.com>
Date: Sat, 14 Feb 2026 21:11:40 -0800
Subject: chore: fix lint and type errors to resolve CI failures

---
 frontend/src/App.test.tsx | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

(limited to 'frontend/src/App.test.tsx')

diff --git a/frontend/src/App.test.tsx b/frontend/src/App.test.tsx
index 196f32a..1ef9763 100644
--- a/frontend/src/App.test.tsx
+++ b/frontend/src/App.test.tsx
@@ -11,20 +11,21 @@ describe('App', () => {
   });
 
   it('renders login on initial load (unauthenticated)', async () => {
-    (global.fetch as any).mockResolvedValueOnce({
+    vi.mocked(global.fetch).mockResolvedValueOnce({
       ok: false,
-    });
+    } as Response);
     window.history.pushState({}, 'Test page', '/v2/login');
     render(<App />);
     expect(screen.getByRole('button', { name: /login/i })).toBeInTheDocument();
   });
 
   it('renders dashboard when authenticated', async () => {
-    (global.fetch as any).mockImplementation((url: string) => {
-      if (url.includes('/api/auth')) return Promise.resolve({ ok: true });
-      if (url.includes('/api/feed/')) return Promise.resolve({ ok: true, json: async () => [] });
-      if (url.includes('/api/tag')) return Promise.resolve({ ok: true, json: async () => [] });
-      return Promise.resolve({ ok: true }); // Fallback
+    vi.mocked(global.fetch).mockImplementation((url) => {
+      const urlStr = url.toString();
+      if (urlStr.includes('/api/auth')) return Promise.resolve({ ok: true } as Response);
+      if (urlStr.includes('/api/feed/')) return Promise.resolve({ ok: true, json: async () => [] } as Response);
+      if (urlStr.includes('/api/tag')) return Promise.resolve({ ok: true, json: async () => [] } as Response);
+      return Promise.resolve({ ok: true } as Response); // Fallback
     });
 
     window.history.pushState({}, 'Test page', '/v2/');
@@ -44,7 +45,7 @@ describe('App', () => {
       value: { href: '' },
     });
 
-    (global.fetch as any).mockResolvedValueOnce({ ok: true });
+    vi.mocked(global.fetch).mockResolvedValueOnce({ ok: true } as Response);
 
     fireEvent.click(logoutBtn);
 
-- 
cgit v1.2.3

