import '@testing-library/jest-dom';
import { vi } from 'vitest';

const localStorageMock = {
  getItem: vi.fn(),
  setItem: vi.fn(),
  removeItem: vi.fn(),
  clear: vi.fn(),
  length: 0,
  key: vi.fn(),
};

global.localStorage = localStorageMock as unknown as Storage;
globalThis.localStorage = localStorageMock as unknown as Storage;

if (typeof document === 'undefined') {
  Object.defineProperty(globalThis, 'document', {
    value: {
      body: {},
    },
    writable: true,
  });
}


