import { expect, afterEach } from 'vitest';
import { cleanup } from '@testing-library/react';
import '@testing-library/jest-dom/vitest'; // Direct side-effect import for Vitest
import 'fake-indexeddb/auto';

// No need for expect.extend check if we use the side-effect import above,
// but for safety in older versions:
import * as matchers from '@testing-library/jest-dom/matchers';
expect.extend(matchers);

// Cleanup after each test
afterEach(() => {
  cleanup();
});
