setup.ts
1 import '@testing-library/jest-dom' 2 import { vi } from 'vitest' 3 4 // Mock Obsidian API globally 5 global.window = global.window || {} 6 7 // Mock the Notice class 8 global.Notice = vi.fn().mockImplementation(() => ({ 9 hide: vi.fn(), 10 })) 11 12 // Setup console to not spam during tests 13 global.console = { 14 ...console, 15 log: vi.fn(), 16 warn: vi.fn(), 17 error: vi.fn(), 18 }