DocHub/frontend/tests/setup.ts
Tianyang 08a1211341 feat: favicon, sidebar tooltip, fix Meilisearch auth and test warnings
- Add SVG favicon using pine/paper design tokens; wire into index.html
- Add SidebarLabel component with ResizeObserver overflow detection and
  CSS-only tooltip (pine-deep bg, IBM Plex Mono, 0.08s fade, no delay)
- Fix Meilisearch invalid_api_key: default api key to None instead of ''
  so no Authorization header is sent when auth is disabled
- Stub ResizeObserver in test setup for jsdom compatibility
- Wrap async renders in act() and advance fake timers inside act() to
  eliminate all act() warnings in App.test.tsx
2026-08-01 18:44:32 +08:00

9 lines
219 B
TypeScript

import '@testing-library/jest-dom/vitest';
// jsdom doesn't implement ResizeObserver; provide a no-op stub for tests.
global.ResizeObserver = class ResizeObserver {
observe() {}
unobserve() {}
disconnect() {}
};