fix(frontend): resolve lint blockers for gitea frontend-ci

This commit is contained in:
WorkClub Automation
2026-03-06 22:26:55 +01:00
parent ad6a23621d
commit 5cf43976f6
16 changed files with 112 additions and 96 deletions

View File

@@ -1,7 +1,6 @@
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
import { describe, it, expect, beforeEach, vi } from 'vitest';
import { renderHook, act } from '@testing-library/react';
import { useActiveClub } from '../useActiveClub';
import type { Session } from 'next-auth';
const mockUseSession = vi.fn();
@@ -33,15 +32,15 @@ describe('useActiveClub', () => {
status: 'authenticated',
});
(localStorage.getItem as any).mockImplementation((key: string) => {
(localStorage.getItem as ReturnType<typeof vi.fn>).mockImplementation((key: string) => {
return localStorageData[key] || null;
});
(localStorage.setItem as any).mockImplementation((key: string, value: string) => {
(localStorage.setItem as ReturnType<typeof vi.fn>).mockImplementation((key: string, value: string) => {
localStorageData[key] = value;
});
(localStorage.clear as any).mockImplementation(() => {
(localStorage.clear as ReturnType<typeof vi.fn>).mockImplementation(() => {
localStorageData = {};
});
});