fix(frontend): resolve lint blockers for gitea frontend-ci
This commit is contained in:
@@ -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 = {};
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user