andy-stack_vaultkeeper-ai/__tests__/setup.ts
Andrew Beal 0fb17e7b3a feat: add planning model selection and rate limit countdown UI
Introduce separate planning model setting to allow using different models for planning vs execution. Add visual countdown display when rate limits are hit, with improved retry delay parsing across providers (Claude, OpenAI, Gemini). Refactor settings tab into Views directory and enhance mobile layout for input controls.
2026-01-05 21:49:51 +00:00

27 lines
646 B
TypeScript

/**
* Test setup file - runs before all tests
*/
import { afterEach, vi } from 'vitest';
// Mock global window if needed
if (typeof global.window === 'undefined') {
global.window = {} as any;
}
// Note: Component class is now defined in __mocks__/obsidian.ts
// The vitest alias in vitest.config.ts handles mocking 'obsidian' imports
// Add Obsidian's .empty() method to HTMLElement prototype for testing
if (typeof HTMLElement !== 'undefined') {
HTMLElement.prototype.empty = function() {
while (this.firstChild) {
this.removeChild(this.firstChild);
}
};
}
// Clean up after each test
afterEach(() => {
vi.clearAllMocks();
});