/**
 * Shared DOM test setup for component tests.
 *
 * Usage: add `// @vitest-environment jsdom` as the FIRST line of a component
 * test file, then `import '../test/dom-setup';` (adjust the relative depth).
 * This registers @testing-library/jest-dom matchers (toBeInTheDocument, etc.)
 * and an automatic React Testing Library cleanup after each test.
 *
 * Pure-logic tests under ui/src/lib stay in the default node environment and do
 * NOT import this — keeping the ~5600 node tests fast.
 */
import '@testing-library/jest-dom/vitest';
import { afterEach } from 'vitest';
import { cleanup } from '@testing-library/react';

afterEach(() => {
  cleanup();
});
